{"id":21684036,"url":"https://github.com/epic-digital-im/webpack-plugin-parse-functions","last_synced_at":"2026-03-15T18:03:58.416Z","repository":{"id":62319463,"uuid":"535836152","full_name":"epic-digital-im/webpack-plugin-parse-functions","owner":"epic-digital-im","description":"A Webpack plugin for Parse Platform development","archived":false,"fork":false,"pushed_at":"2025-06-13T17:00:14.000Z","size":444,"stargazers_count":0,"open_issues_count":6,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-08T15:56:59.119Z","etag":null,"topics":["parse-server","parseplatform","webpack"],"latest_commit_sha":null,"homepage":"https://github.com/epic-digital-im/webpack-plugin-parse-functions","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/epic-digital-im.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":"SUPPORT.md","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-09-12T20:17:44.000Z","updated_at":"2023-02-14T00:42:42.000Z","dependencies_parsed_at":"2025-06-13T18:22:45.112Z","dependency_job_id":"f51f4b79-0dba-4585-ab55-d4679530cbf9","html_url":"https://github.com/epic-digital-im/webpack-plugin-parse-functions","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/epic-digital-im/webpack-plugin-parse-functions","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/epic-digital-im%2Fwebpack-plugin-parse-functions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/epic-digital-im%2Fwebpack-plugin-parse-functions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/epic-digital-im%2Fwebpack-plugin-parse-functions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/epic-digital-im%2Fwebpack-plugin-parse-functions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/epic-digital-im","download_url":"https://codeload.github.com/epic-digital-im/webpack-plugin-parse-functions/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/epic-digital-im%2Fwebpack-plugin-parse-functions/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269806554,"owners_count":24478243,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-10T02:00:08.965Z","response_time":71,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["parse-server","parseplatform","webpack"],"created_at":"2024-11-25T16:14:23.373Z","updated_at":"2026-03-15T18:03:53.382Z","avatar_url":"https://github.com/epic-digital-im.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n \u003cimg width=\"100px\" src=\"https://raw.githubusercontent.com/epicdigitalmedia/epic-ts-npm-boilerplate/main/.github/images/favicon512x512-npm.png\" align=\"center\" alt=\":package: webpack-plugin-parse-functions\" /\u003e\n \u003cimg width=\"100px\" src=\"https://avatars.githubusercontent.com/u/113625277?s=200\u0026v=4\" align=\"center\" alt=\":package: webpack-plugin-parse-functions\" /\u003e\n \u003ch2 align=\"center\"\u003e:package: webpack-plugin-parse-functions\u003c/h2\u003e\n \u003cp align=\"center\"\u003eParse Platform Function Plugin\u003c/p\u003e\n  \u003cp align=\"center\"\u003e\n    \u003ca href=\"https://github.com/epic-digital-im/webpack-plugin-parse-functions/issues/new/choose\"\u003eReport Bug\u003c/a\u003e\n    \u003ca href=\"https://github.com/epic-digital-im/webpack-plugin-parse-functions/issues/new/choose\"\u003eRequest Feature\u003c/a\u003e\n  \u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cstrong\u003eParse Platform Function Plugin\u003c/strong\u003e 🚀\n\u003c/p\u003e\n\n# Overview\nThis is a Webpack plugin designed to make development on top of the Parse Platform more seamless.\n\n# Getting Started\n## How it works\nIf you're familiar with Next.js, you know that the routes are built out based on the file structure of the project. This follows a similar methodology.\n\nThe default file structure looks like this:\n- src\n  - functions\n    - `\u003cserviceName\u003e`\n      - schema.json -- the schema of the `Parse.Object`-based service\n      - `\u003chookName\u003e`\n        - `0.\u003chookName\u003e.ts`\n        - config.ts -- the configuration object to be passed to `Parse.Cloud.\u003chookName\u003e(\u003cclassName\u003e, \u003chandler\u003e, \u003cconfig\u003e)`\n      - functions\n        - `\u003cfunctionName\u003e.ts` - functions to be defined with `Parse.Cloud.define('\u003cfunctionName\u003e', \u003cfunction\u003e)`\n      - jobs\n        - `\u003cjobName\u003e.ts` - jobs to be defined with `Parse.Cloud.job('\u003cfunctionName\u003e', \u003cfunction\u003e)`\n      - triggers\n        - `\u003ctriggerName\u003e.ts` - post-hook triggers that will conditionally run `Parse.Cloud.run('\u003ctriggerName\u003e', payload)`, where `payload` is the parameter of the running hook\n    - `..\u003cmore services\u003e...`\n\nThe available hooks are:\n- beforeSave\n- afterSave\n- beforeDelete\n- afterDelete\n- afterCreate\n- afterUpdate\n- beforeCreate\n- beforeUpdate\n\nThese hooks targeted at cron jobs are defined and available to be run with `Parse.Cloud.startJob('\u003cClassName\u003e_\u003cfrequency\u003e')`\n- hourly -- e.g. `Parse.Cloud.startJob('ActionItem_hourly')`\n- daily\n- weekly\n- monthly\n- datetime\n\n## ActionTrigger\nThis is a special type of `Parse.Object` that is used to trigger cascading actions conditionally when a hook is run.\n\nThere are 4 conditions that must be met before an ActionTrigger will take effect:\n- `ActionTrigger.active` is true\n- `ActionTrigger.objectClass` matches the class of Parse.Object that is being run through the hook\n- `object[ActionTrigger.property]` -\u003e `ActionTrigger.condition` -\u003e `ActionTrigger.value`. For example:\n  - `user.email` -\u003e `equalTo` -\u003e `brenda@yahoo.com` -- this trigger will run only when the `User` instance's `email` property is equal to `brenda@yahoo.com`\n- `ActionTrigger.handler` is equal to an extant trigger handler function name (i.e. in the `src/functions/\u003cserviceName\u003e/triggers/\u003csomeTriggerHandler\u003e.ts`)\n\nIf your project doesn't need to trigger cascading function calls, you won't need to worry about this.\n\n## How to Use\nThis is a normal Webpack plugin and can be used like so:\n\n```js\n// webpack.config.js\nconst path = require('path');\nconst ParseFunctionsPlugin = require('../dist/main').default;\n\nconst config = {\n  entry: './src/index.ts',\n  output: {\n    path: path.resolve(__dirname, 'dist'),\n  },\n  plugins: [\n    new ParseFunctionsPlugin(),\n  ],\n  // ...and the rest\n};\n```\n\n### Plugin Options\n```js\n{\n  functionDirectory: 'src/functions', // the directory to watch \u0026 build Parse functions\n  moduleAlias: '@@functions', // the alias name used for importing the built files\n                              // from, e.g. `import initialize, { ClassNames } from '@@functions';`\n}\n```\nThe default option should be preferred, but there may be times where the project requires that you diverge from these naming conventions.\n\n### On Build\nWhen the plugin runs, it will aggregate the files (according to the file structure above) and transpile them into modules in a `.build` folder that may then be accessed by importing members from the `moduleAlias` (default `@@functions`);\n\n### Built Exports\nAfter building, the built modules can be accessed using the module alias (default: `@@functions`), and will export the following.\n\n#### Constants\n```typescript\nexport enum ClassNames {\n  [\u003cClassName\u003e]: '\u003cClassName\u003e'\n}\n\nexport const ClassNamesList = Object.values(ClassNames);\n\nexport const TriggerHandlers: TriggerHandlersMap = {\n  \u003cClassName\u003e: [\n    {\n      label: \"\u003ctriggerHandlerName\u003e\",\n      value: \"\u003ctriggerHandlerName\u003e\",\n    },\n  ],\n};\n\nexport const Schemas: SchemaMap = {\n  [\u003cClassName\u003e]: { /* ...JSON object representation of Parse.Object\u003cClassName\u003e schema */ }\n}\n```\n\n#### Types\n```typescript\nexport type SchemaMap = {\n  [prop in ClassNames]: ParseFunctionServiceSchema;\n};\n\nexport type TriggerHandlerOption = {\n  label: string;\n  value: string;\n};\n\nexport type TriggerHandlersMap = {\n  [prop in ClassNames]: TriggerHandlerOption[];\n};\n```\n\n#### Initializer\n```typescript\n/* === INITIALIZER === */\nconst initialize = (Parse: ParseType) =\u003e {\n  \u003cserviceName\u003e(Parse);\n  /* ... more services here ... */\n};\n\nexport default initialize;\n```\n\n# TODO\n- [x] Create custom hook handlers for:\n  - [x] beforeCreate -- fires before the initial creation of an object\n  - [x] afterCreate -- fires after the initial creation of an object\n  - [x] beforeUpdate -- fires before a previously created object is updated\n  - [x] afterUpdate -- fires after a previously created object is updated\n  - [x] hourly -- a cron job that fires hourly\n  - [x] daily -- a cron job that fires daily\n  - [x] weekly -- a cron job that fires weekly\n  - [x] monthly -- a cron job that fires monthly\n  - [x] datetime -- a cron job that fires on a specific datetime\n- [x] Make a `processActionTriggers` function to avoid duplicate code\n- [x] Rework functions, jobs, and triggers to export a factory function that takes a `Parse` instance as the first parameter, a configuration or context parameter, and returns a function\n- [ ] Make helper types for hooks, functions, jobs, and triggers\n- [x] Make export for trigger handler parameter schema\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fepic-digital-im%2Fwebpack-plugin-parse-functions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fepic-digital-im%2Fwebpack-plugin-parse-functions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fepic-digital-im%2Fwebpack-plugin-parse-functions/lists"}