@particle-academy/google-drive-ui 0.3.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -4,6 +4,31 @@ All notable changes to `@particle-academy/google-drive-ui`,
4
4
  `@particle-academy/google-drive-js`, `particle-academy/google-drive-php` and
5
5
  `fancy-google-drive`.
6
6
 
7
+ ## [0.3.1] — 2026-08-24
8
+
9
+ ### Fixed
10
+
11
+ - **`@particle-academy/google-drive-js` now accepts a RANGE of `@particle-academy/google-drive-ui`, not one exact version.**
12
+
13
+ It peer-depended on `@particle-academy/google-drive-ui` at exactly the release it shipped with. That is the
14
+ strict form of the thing the kit's own rule forbids — a first-party sibling gets
15
+ a range — and the same block applied the rule correctly to its other two
16
+ dependencies. It was this one pair that slipped.
17
+
18
+ What it cost: ship `@particle-academy/google-drive-ui` with a fixed help string and every consumer on the
19
+ previous `@particle-academy/google-drive-js` had an **unmet peer**, which npm 7+ errors on. A documentation
20
+ patch could not be delivered without a matching runtime release, and a routine
21
+ `npm update` that moved the ui package alone broke the install.
22
+
23
+ The coupling is real and is not being loosened away. The ui package emits the
24
+ config schema and the js package implements against it, so a ui that adds a
25
+ field to a js that ignores it is silently wrong. But a PATCH is non-additive by
26
+ definition and a MINOR is where a field can appear — so `>=0.3.1 <0.4.0` is the
27
+ coupling that actually exists rather than the strictest one expressible.
28
+
29
+ Nothing else changed. `particle-academy/google-drive-php` and `fancy-google-drive` are unaffected; neither has an
30
+ equivalent edge.
31
+
7
32
  ## [0.3.0] — 2026-08-24
8
33
 
9
34
  ### Added
@@ -83,3 +108,4 @@ tests create real folders and retries can create duplicates.
83
108
  [0.1.0]: https://github.com/Fancy-Friends/google-drive/releases/tag/v0.1.0
84
109
  [0.2.0]: https://github.com/Fancy-Friends/google-drive/releases/tag/v0.2.0
85
110
  [0.3.0]: https://github.com/Fancy-Friends/google-drive/releases/tag/v0.3.0
111
+ [0.3.1]: https://github.com/Fancy-Friends/google-drive/releases/tag/v0.3.1
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/service.ts","../src/kinds/folder-create.ts","../src/index.ts"],"names":["defineConnectorKind","summarize"],"mappings":";;;;;AAiCO,IAAM,qBAAA,GAAwB;AAG9B,IAAM,oBAAA,GAAuB;AAAA,EAClC,OAAA,EAAS,cAAA;AAAA,EACT,YAAA,EAAc,cAAA;AAAA,EACd,MAAA,EAAQ,cAAA;AAAA,EACR,OAAA,EAAS;AACX;AAGO,IAAM,wBAAA,GAA2B;AAAA,EACtC;AAAA,IACE,KAAA,EAAO,UAAA;AAAA,IACP,OAAA,EAAS,iBAAA;AAAA,IACT,OAAA,EAAS,UAAA;AAAA,IACT,QAAA,EAAU,KAAA;AAAA,IACV,MAAA,EAAQ;AAAA,GACV;AAAA,EACA;AAAA,IACE,KAAA,EAAO,cAAA;AAAA,IACP,OAAA,EAAS,qBAAA;AAAA,IACT,OAAA,EAAS,UAAA;AAAA,IACT,QAAA,EAAU,IAAA;AAAA,IACV,MAAA,EAAQ;AAAA,GACV;AAAA,EACA;AAAA,IACE,KAAA,EAAO,aAAA;AAAA,IACP,OAAA,EAAS,cAAA;AAAA,IACT,OAAA,EAAS,SAAA;AAAA,IACT,QAAA,EAAU,IAAA;AAAA,IACV,MAAA,EAAQ;AAAA,GACV;AAAA,EACA;AAAA,IACE,KAAA,EAAO,cAAA;AAAA,IACP,OAAA,EAAS,eAAA;AAAA,IACT,OAAA,EAAS,SAAA;AAAA,IACT,QAAA,EAAU,IAAA;AAAA,IACV,MAAA,EAAQ;AAAA;AAEZ;AAoBO,IAAM,kBAAA,GAAqB;AAAA,EAChC,MAAA,EAAQ,oBAAA;AAAA,EACR,cAAA,EAAgB,8CAAA;AAAA,EAChB,UAAA,EAAY,qCAAA;AAAA,EACZ,QAAA,EAAU;AAAA,IACR;AAAA,GACF;AAAA,EACA,uBAAA,EAAyB,aAAA;AAAA,EACzB,wBAAA,EAA0B,cAAA;AAAA,EA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AO,MAAA;AAAA,MACP,OAAA,EAAS,aAAA;AAAA,MACT,UAAA,EAAY,IAAA;AAAA,MACZ,aAAA,EAAe;AAAA,KACjB;AAAA,IACA;AAAA,MACE,MAAA,EAAQ,MAAA;AAAA,MACR,KAAA,EAAO,SAAA;AAAA,MACP,OAAA,EAAS,mBAAA;AAAA,MACT,aAAA,EAAe;AAAA;AACjB,GACF;AAAA,EACA,aAAA,EAAe;AAAA,IACb,MAAA,EAAQ;AAAA,GACV;AAAA,EACA,UAAA,EAAY,CAAC,EAAE,MAAA,OACbC,oBAAA,CAAU,wBAAA,EAA0B,QAAmC,iBAAiB;AAC5F,CAAC;;;AC9DM,IAAM,kBAAA,GAA2C;AAAA,EACtD;AACF","file":"index.cjs","sourcesContent":["/**\n * GENERATED FILE — do not edit.\n *\n * Emitted from provider/manifest.json by weaver's generator.\n * A hand-edit here is destroyed by the next protocol sync, which is worse than\n * being rejected, because it works until it silently does not. Fix\n * provider/manifest.json (or weaver's template/) and regenerate:\n *\n * npm run provider -- google_drive\n */\n\n/**\n * Google Drive's identity on the authoring surface, shared by every Google\n * Drive node.\n *\n * This file must import nothing from the js package: a PHP or Python project\n * installs the ui package and never that one, and the import would be a\n * dangling module the moment it did.\n *\n * ## The sandbox trap\n *\n * Google Drive has no sandbox. Every folder created in live mode is real; use\n * the faker during development and delete live test folders afterward.\n */\n\nimport type { ConnectorMeta } from \"@particle-academy/fancy-flow/connectors\";\n\n/**\n * The connector API version this package was GENERATED against.\n *\n * A literal, never imported — an imported constant lets an upgrade rewrite the\n * very claim it exists to detect.\n */\nexport const CONNECTOR_API_VERSION = 1;\n\n/** The parts of a connector's identity that belong to the SERVICE, not the node. */\nexport const GOOGLE_DRIVE_SERVICE = {\n service: \"google_drive\",\n serviceTitle: \"Google Drive\",\n domain: \"productivity\",\n sandbox: \"none\",\n} as const satisfies Pick<ConnectorMeta, \"service\" | \"serviceTitle\" | \"domain\" | \"sandbox\">;\n\n/** The credentials a Google Drive connection holds. */\nexport const GOOGLE_DRIVE_CREDENTIALS = [\n {\n \"key\": \"clientId\",\n \"label\": \"OAuth client ID\",\n \"scope\": \"provider\",\n \"secret\": false,\n \"help\": \"From Google Cloud Console. One value for the whole installation.\"\n },\n {\n \"key\": \"clientSecret\",\n \"label\": \"OAuth client secret\",\n \"scope\": \"provider\",\n \"secret\": true,\n \"help\": \"The client secret for the same OAuth app.\"\n },\n {\n \"key\": \"accessToken\",\n \"label\": \"Access token\",\n \"scope\": \"account\",\n \"secret\": true,\n \"help\": \"Per connected Google account; expires after one hour.\"\n },\n {\n \"key\": \"refreshToken\",\n \"label\": \"Refresh token\",\n \"scope\": \"account\",\n \"secret\": true,\n \"help\": \"Per connected Google account; the host uses it to refresh the access token.\"\n }\n] as const;\n\n/**\n * The OAuth2 exchange Google Drive requires — DECLARED here, performed by the\n * host.\n *\n * A consent screen needs a browser, a redirect URI and somewhere to persist\n * the result, and all three belong to the host; a package that ran the dance\n * itself would have to own a web server. So this says precisely enough for a\n * host to do it.\n *\n * The access token lasts 3600 seconds. A host that never refreshes will work\n * all afternoon and be broken by morning, which is why the lifetime is stated\n * rather than left to be discovered.\n *\n * Its refresh tokens do NOT rotate: the same one is reusable, so a refresh may\n * safely be retried and may run concurrently. That is stated rather than\n * assumed because the opposite — a provider that spends the token and revokes\n * the grant on a replay — looks identical until it happens.\n */\nexport const GOOGLE_DRIVE_OAUTH = {\n \"flow\": \"authorization_code\",\n \"authorizeUrl\": \"https://accounts.google.com/o/oauth2/v2/auth\",\n \"tokenUrl\": \"https://oauth2.googleapis.com/token\",\n \"scopes\": [\n \"https://www.googleapis.com/auth/drive.file\"\n ],\n \"accessTokenCredential\": \"accessToken\",\n \"refreshTokenCredential\": \"refreshToken\",\n \"refreshTokenRotates\": false,\n \"accessTokenTtlSeconds\": 3600\n} as const;\n\n/** Build a Google Drive node's connector metadata from the operation it performs. */\nexport function googleDriveMeta(\n role: ConnectorMeta[\"role\"],\n operation: string,\n docs: string,\n): ConnectorMeta {\n return { ...GOOGLE_DRIVE_SERVICE, role, operation, docs };\n}\n","/**\n * GENERATED FILE — do not edit.\n *\n * Emitted from provider/actions/folder-create.json by weaver's generator.\n * A hand-edit here is destroyed by the next protocol sync, which is worse than\n * being rejected, because it works until it silently does not. Fix\n * provider/actions/folder-create.json (or weaver's template/) and regenerate:\n *\n * npm run provider -- google_drive\n */\n\n/**\n * Google Drive folder — Create a folder in Google Drive.\n *\n * https://developers.google.com/workspace/drive/api/reference/rest/v3/files/create\n *\n * `unsafe-to-replay`.\n */\n\nimport type { NodeKindDefinition } from \"@particle-academy/fancy-flow/engine\";\nimport { defineConnectorKind, summarize, type OutputField } from \"@particle-academy/fancy-flow/connectors\";\nimport { googleDriveMeta } from \"../service.js\";\n\nexport const GOOGLE_DRIVE_FOLDER_KIND = \"@particle-academy/google_drive_folder\";\nexport const GOOGLE_DRIVE_FOLDER_OPERATION = \"folder_create\";\n\nexport const GOOGLE_DRIVE_FOLDER_META = googleDriveMeta(\"action\", \"create a folder\", \"https://developers.google.com/workspace/drive/api/reference/rest/v3/files/create\");\n\n/**\n * What this node emits — the \"ingredients\" a downstream node can reference.\n *\n * fancy-flow reads `outputShape` off the kind and offers it in the variable\n * picker, so declaring it is the whole of the work: an author configuring the\n * next node picks `{{ $json.data.id }}` off a list instead of typing a path\n * and hoping.\n */\nexport const GOOGLE_DRIVE_FOLDER_OUTPUT: OutputField[] = [\n {\n \"path\": \"data.id\",\n \"type\": \"string\",\n \"description\": \"The created folder's id.\"\n },\n {\n \"path\": \"data.name\",\n \"type\": \"string\",\n \"description\": \"The folder name Google stored.\"\n },\n {\n \"path\": \"data.mimeType\",\n \"type\": \"string\",\n \"description\": \"The fixed Google Drive folder MIME type.\"\n },\n {\n \"path\": \"data.parents\",\n \"type\": \"array\",\n \"description\": \"The parent folder id array returned by Drive.\"\n }\n];\n\nexport const googleDriveFolderKind: NodeKindDefinition = defineConnectorKind(GOOGLE_DRIVE_FOLDER_META, {\n name: GOOGLE_DRIVE_FOLDER_KIND,\n aliases: [\"google_drive_folder\"],\n label: \"Google Drive folder\",\n description: \"Create a folder in Google Drive.\",\n inputs: [{ id: \"in\" }],\n outputs: [{ id: \"out\" }],\n sideEffects: \"unsafe-to-replay\",\n outputShape: GOOGLE_DRIVE_FOLDER_OUTPUT,\n configSchema: [\n {\n \"type\": \"text\",\n \"key\": \"name\",\n \"label\": \"Folder name\",\n \"required\": true,\n \"description\": \"The folder name. Drive does not require names to be unique within a parent.\"\n },\n {\n \"type\": \"text\",\n \"key\": \"parents\",\n \"label\": \"Parent folder IDs\",\n \"description\": \"Parent folder ids, comma separated. Leave empty to create the folder in My Drive.\"\n }\n ],\n defaultConfig: {\n \"mode\": \"auto\"\n },\n renderBody: ({ config }) =>\n summarize(GOOGLE_DRIVE_FOLDER_META, config as Record<string, unknown>, \"create a folder\"),\n});\n","/**\n * GENERATED FILE — do not edit.\n *\n * Emitted from provider/manifest.json by weaver's generator.\n * A hand-edit here is destroyed by the next protocol sync, which is worse than\n * being rejected, because it works until it silently does not. Fix\n * provider/manifest.json (or weaver's template/) and regenerate:\n *\n * npm run provider -- google_drive\n */\n\n/**\n * Google Drive's node kinds for fancy-flow.\n *\n * Install this on every host. The TypeScript executors live in the js\n * package's `./flow` subpath; PHP and Python hosts run their own and need only\n * this.\n */\n\nexport * from \"./service.js\";\nexport * from \"./kinds/folder-create.js\";\n\nimport type { NodeKindDefinition } from \"@particle-academy/fancy-flow/engine\";\nimport { googleDriveFolderKind } from \"./kinds/folder-create.js\";\n\n/** Every Google Drive kind, for a host that registers the lot. */\nexport const GOOGLE_DRIVE_KINDS: NodeKindDefinition[] = [\n googleDriveFolderKind,\n];\n"]}
1
+ {"version":3,"sources":["../src/service.ts","../src/kinds/folder-create.ts","../src/index.ts"],"names":["defineConnectorKind","summarize"],"mappings":";;;;;AAiCO,IAAM,qBAAA,GAAwB;AAG9B,IAAM,oBAAA,GAAuB;AAAA,EAClC,OAAA,EAAS,cAAA;AAAA,EACT,YAAA,EAAc,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EACA,aAAA,EAAe;AAAA,IACb,MAAA,EAAQ;AAAA,GACV;AAAA,EACA,UAAA,EAAY,CAAC,EAAE,MAAA,OACbC,oBAAA,CAAU,wBAAA,EAA0B,QAAmC,iBAAiB;AAC5F,CAAC;;;AC9DM,IAAM,kBAAA,GAA2C;AAAA,EACtD;AACF","file":"index.cjs","sourcesContent":["/**\n * GENERATED FILE — do not edit.\n *\n * Emitted from provider/manifest.json by weaver's generator.\n * A hand-edit here is destroyed by the next protocol sync, which is worse than\n * being rejected, because it works until it silently does not. Fix\n * provider/manifest.json (or weaver's template/) and regenerate:\n *\n * npm run provider -- google_drive\n */\n\n/**\n * Google Drive's identity on the authoring surface, shared by every Google\n * Drive node.\n *\n * This file must import nothing from the js package: a PHP or Python project\n * installs the ui package and never that one, and the import would be a\n * dangling module the moment it did.\n *\n * ## The sandbox trap\n *\n * Google Drive has no sandbox. Every folder created in live mode is real; use\n * the faker during development and delete live test folders afterward.\n */\n\nimport type { ConnectorDomain, ConnectorMeta } from \"@particle-academy/fancy-flow/connectors\";\n\n/**\n * The connector API version this package was GENERATED against.\n *\n * A literal, never imported — an imported constant lets an upgrade rewrite the\n * very claim it exists to detect.\n */\nexport const CONNECTOR_API_VERSION = 1;\n\n/** The parts of a connector's identity that belong to the SERVICE, not the node. */\nexport const GOOGLE_DRIVE_SERVICE = {\n service: \"google_drive\",\n serviceTitle: \"Google Drive\",\n domain: \"productivity\",\n sandbox: \"none\",\n} as const satisfies Pick<ConnectorMeta, \"service\" | \"serviceTitle\" | \"domain\" | \"sandbox\">;\n\n/**\n * Every connector domain weaver knows, pinned against fancy-flow's union.\n *\n * A closed set copied into three codebases stays correct only while something\n * MAKES it: this line fails to compile the moment weaver carries a value\n * fancy-flow does not, including the values no provider uses yet.\n */\nconst WEAVER_DOMAINS: readonly ConnectorDomain[] = [\n \"payments\",\n \"commerce\",\n \"messaging\",\n \"email\",\n \"crm\",\n \"support\",\n \"storage\",\n \"calendar\",\n \"productivity\",\n \"database\",\n \"devtools\",\n \"analytics\",\n \"marketing\",\n \"ai\",\n \"forms\",\n \"hr\",\n \"geo\"\n];\nvoid WEAVER_DOMAINS;\n\n/** The credentials a Google Drive connection holds. */\nexport const GOOGLE_DRIVE_CREDENTIALS = [\n {\n \"key\": \"clientId\",\n \"label\": \"OAuth client ID\",\n \"scope\": \"provider\",\n \"secret\": false,\n \"help\": \"From Google Cloud Console. One value for the whole installation.\"\n },\n {\n \"key\": \"clientSecret\",\n \"label\": \"OAuth client secret\",\n \"scope\": \"provider\",\n \"secret\": true,\n \"help\": \"The client secret for the same OAuth app.\"\n },\n {\n \"key\": \"accessToken\",\n \"label\": \"Access token\",\n \"scope\": \"account\",\n \"secret\": true,\n \"help\": \"Per connected Google account; expires after one hour.\"\n },\n {\n \"key\": \"refreshToken\",\n \"label\": \"Refresh token\",\n \"scope\": \"account\",\n \"secret\": true,\n \"help\": \"Per connected Google account; the host uses it to refresh the access token.\"\n }\n] as const;\n\n/**\n * The OAuth2 exchange Google Drive requires — DECLARED here, performed by the\n * host.\n *\n * A consent screen needs a browser, a redirect URI and somewhere to persist\n * the result, and all three belong to the host; a package that ran the dance\n * itself would have to own a web server. So this says precisely enough for a\n * host to do it.\n *\n * The access token lasts 3600 seconds. A host that never refreshes will work\n * all afternoon and be broken by morning, which is why the lifetime is stated\n * rather than left to be discovered.\n *\n * Its refresh tokens do NOT rotate: the same one is reusable, so a refresh may\n * safely be retried and may run concurrently. That is stated rather than\n * assumed because the opposite — a provider that spends the token and revokes\n * the grant on a replay — looks identical until it happens.\n */\nexport const GOOGLE_DRIVE_OAUTH = {\n \"flow\": \"authorization_code\",\n \"authorizeUrl\": \"https://accounts.google.com/o/oauth2/v2/auth\",\n \"tokenUrl\": \"https://oauth2.googleapis.com/token\",\n \"scopes\": [\n \"https://www.googleapis.com/auth/drive.file\"\n ],\n \"accessTokenCredential\": \"accessToken\",\n \"refreshTokenCredential\": \"refreshToken\",\n \"refreshTokenRotates\": false,\n \"accessTokenTtlSeconds\": 3600\n} as const;\n\n/** Build a Google Drive node's connector metadata from the operation it performs. */\nexport function googleDriveMeta(\n role: ConnectorMeta[\"role\"],\n operation: string,\n docs: string,\n): ConnectorMeta {\n return { ...GOOGLE_DRIVE_SERVICE, role, operation, docs };\n}\n","/**\n * GENERATED FILE — do not edit.\n *\n * Emitted from provider/actions/folder-create.json by weaver's generator.\n * A hand-edit here is destroyed by the next protocol sync, which is worse than\n * being rejected, because it works until it silently does not. Fix\n * provider/actions/folder-create.json (or weaver's template/) and regenerate:\n *\n * npm run provider -- google_drive\n */\n\n/**\n * Google Drive folder — Create a folder in Google Drive.\n *\n * https://developers.google.com/workspace/drive/api/reference/rest/v3/files/create\n *\n * `unsafe-to-replay`.\n */\n\nimport type { NodeKindDefinition } from \"@particle-academy/fancy-flow/engine\";\nimport { defineConnectorKind, summarize, type OutputField } from \"@particle-academy/fancy-flow/connectors\";\nimport { googleDriveMeta } from \"../service.js\";\n\nexport const GOOGLE_DRIVE_FOLDER_KIND = \"@particle-academy/google_drive_folder\";\nexport const GOOGLE_DRIVE_FOLDER_OPERATION = \"folder_create\";\n\nexport const GOOGLE_DRIVE_FOLDER_META = googleDriveMeta(\"action\", \"create a folder\", \"https://developers.google.com/workspace/drive/api/reference/rest/v3/files/create\");\n\n/**\n * What this node emits — the \"ingredients\" a downstream node can reference.\n *\n * fancy-flow reads `outputShape` off the kind and offers it in the variable\n * picker, so declaring it is the whole of the work: an author configuring the\n * next node picks `{{ $json.data.id }}` off a list instead of typing a path\n * and hoping.\n */\nexport const GOOGLE_DRIVE_FOLDER_OUTPUT: OutputField[] = [\n {\n \"path\": \"data.id\",\n \"type\": \"string\",\n \"description\": \"The created folder's id.\"\n },\n {\n \"path\": \"data.name\",\n \"type\": \"string\",\n \"description\": \"The folder name Google stored.\"\n },\n {\n \"path\": \"data.mimeType\",\n \"type\": \"string\",\n \"description\": \"The fixed Google Drive folder MIME type.\"\n },\n {\n \"path\": \"data.parents\",\n \"type\": \"array\",\n \"description\": \"The parent folder id array returned by Drive.\"\n }\n];\n\nexport const googleDriveFolderKind: NodeKindDefinition = defineConnectorKind(GOOGLE_DRIVE_FOLDER_META, {\n name: GOOGLE_DRIVE_FOLDER_KIND,\n aliases: [\"google_drive_folder\"],\n label: \"Google Drive folder\",\n description: \"Create a folder in Google Drive.\",\n inputs: [{ id: \"in\" }],\n outputs: [{ id: \"out\" }],\n sideEffects: \"unsafe-to-replay\",\n outputShape: GOOGLE_DRIVE_FOLDER_OUTPUT,\n configSchema: [\n {\n \"type\": \"text\",\n \"key\": \"name\",\n \"label\": \"Folder name\",\n \"required\": true,\n \"description\": \"The folder name. Drive does not require names to be unique within a parent.\"\n },\n {\n \"type\": \"text\",\n \"key\": \"parents\",\n \"label\": \"Parent folder IDs\",\n \"description\": \"Parent folder ids, comma separated. Leave empty to create the folder in My Drive.\"\n }\n ],\n defaultConfig: {\n \"mode\": \"auto\"\n },\n renderBody: ({ config }) =>\n summarize(GOOGLE_DRIVE_FOLDER_META, config as Record<string, unknown>, \"create a folder\"),\n});\n","/**\n * GENERATED FILE — do not edit.\n *\n * Emitted from provider/manifest.json by weaver's generator.\n * A hand-edit here is destroyed by the next protocol sync, which is worse than\n * being rejected, because it works until it silently does not. Fix\n * provider/manifest.json (or weaver's template/) and regenerate:\n *\n * npm run provider -- google_drive\n */\n\n/**\n * Google Drive's node kinds for fancy-flow.\n *\n * Install this on every host. The TypeScript executors live in the js\n * package's `./flow` subpath; PHP and Python hosts run their own and need only\n * this.\n */\n\nexport * from \"./service.js\";\nexport * from \"./kinds/folder-create.js\";\n\nimport type { NodeKindDefinition } from \"@particle-academy/fancy-flow/engine\";\nimport { googleDriveFolderKind } from \"./kinds/folder-create.js\";\n\n/** Every Google Drive kind, for a host that registers the lot. */\nexport const GOOGLE_DRIVE_KINDS: NodeKindDefinition[] = [\n googleDriveFolderKind,\n];\n"]}
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/service.ts","../src/kinds/folder-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ACA;AAAA,MACE,MAAA,EAAQ,MAAA;AAAA,MACR,KAAA,EAAO,SAAA;AAAA,MACP,OAAA,EAAS,mBAAA;AAAA,MACT,aAAA,EAAe;AAAA;AACjB,GACF;AAAA,EACA,aAAA,EAAe;AAAA,IACb,MAAA,EAAQ;AAAA,GACV;AAAA,EACA,UAAA,EAAY,CAAC,EAAE,MAAA,OACb,SAAA,CAAU,wBAAA,EAA0B,QAAmC,iBAAiB;AAC5F,CAAC;;;AC9DM,IAAM,kBAAA,GAA2C;AAAA,EACtD;AACF","file":"index.js","sourcesContent":["/**\n * GENERATED FILE — do not edit.\n *\n * Emitted from provider/manifest.json by weaver's generator.\n * A hand-edit here is destroyed by the next protocol sync, which is worse than\n * being rejected, because it works until it silently does not. Fix\n * provider/manifest.json (or weaver's template/) and regenerate:\n *\n * npm run provider -- google_drive\n */\n\n/**\n * Google Drive's identity on the authoring surface, shared by every Google\n * Drive node.\n *\n * This file must import nothing from the js package: a PHP or Python project\n * installs the ui package and never that one, and the import would be a\n * dangling module the moment it did.\n *\n * ## The sandbox trap\n *\n * Google Drive has no sandbox. Every folder created in live mode is real; use\n * the faker during development and delete live test folders afterward.\n */\n\nimport type { ConnectorMeta } from \"@particle-academy/fancy-flow/connectors\";\n\n/**\n * The connector API version this package was GENERATED against.\n *\n * A literal, never imported — an imported constant lets an upgrade rewrite the\n * very claim it exists to detect.\n */\nexport const CONNECTOR_API_VERSION = 1;\n\n/** The parts of a connector's identity that belong to the SERVICE, not the node. */\nexport const GOOGLE_DRIVE_SERVICE = {\n service: \"google_drive\",\n serviceTitle: \"Google Drive\",\n domain: \"productivity\",\n sandbox: \"none\",\n} as const satisfies Pick<ConnectorMeta, \"service\" | \"serviceTitle\" | \"domain\" | \"sandbox\">;\n\n/** The credentials a Google Drive connection holds. */\nexport const GOOGLE_DRIVE_CREDENTIALS = [\n {\n \"key\": \"clientId\",\n \"label\": \"OAuth client ID\",\n \"scope\": \"provider\",\n \"secret\": false,\n \"help\": \"From Google Cloud Console. One value for the whole installation.\"\n },\n {\n \"key\": \"clientSecret\",\n \"label\": \"OAuth client secret\",\n \"scope\": \"provider\",\n \"secret\": true,\n \"help\": \"The client secret for the same OAuth app.\"\n },\n {\n \"key\": \"accessToken\",\n \"label\": \"Access token\",\n \"scope\": \"account\",\n \"secret\": true,\n \"help\": \"Per connected Google account; expires after one hour.\"\n },\n {\n \"key\": \"refreshToken\",\n \"label\": \"Refresh token\",\n \"scope\": \"account\",\n \"secret\": true,\n \"help\": \"Per connected Google account; the host uses it to refresh the access token.\"\n }\n] as const;\n\n/**\n * The OAuth2 exchange Google Drive requires — DECLARED here, performed by the\n * host.\n *\n * A consent screen needs a browser, a redirect URI and somewhere to persist\n * the result, and all three belong to the host; a package that ran the dance\n * itself would have to own a web server. So this says precisely enough for a\n * host to do it.\n *\n * The access token lasts 3600 seconds. A host that never refreshes will work\n * all afternoon and be broken by morning, which is why the lifetime is stated\n * rather than left to be discovered.\n *\n * Its refresh tokens do NOT rotate: the same one is reusable, so a refresh may\n * safely be retried and may run concurrently. That is stated rather than\n * assumed because the opposite — a provider that spends the token and revokes\n * the grant on a replay — looks identical until it happens.\n */\nexport const GOOGLE_DRIVE_OAUTH = {\n \"flow\": \"authorization_code\",\n \"authorizeUrl\": \"https://accounts.google.com/o/oauth2/v2/auth\",\n \"tokenUrl\": \"https://oauth2.googleapis.com/token\",\n \"scopes\": [\n \"https://www.googleapis.com/auth/drive.file\"\n ],\n \"accessTokenCredential\": \"accessToken\",\n \"refreshTokenCredential\": \"refreshToken\",\n \"refreshTokenRotates\": false,\n \"accessTokenTtlSeconds\": 3600\n} as const;\n\n/** Build a Google Drive node's connector metadata from the operation it performs. */\nexport function googleDriveMeta(\n role: ConnectorMeta[\"role\"],\n operation: string,\n docs: string,\n): ConnectorMeta {\n return { ...GOOGLE_DRIVE_SERVICE, role, operation, docs };\n}\n","/**\n * GENERATED FILE — do not edit.\n *\n * Emitted from provider/actions/folder-create.json by weaver's generator.\n * A hand-edit here is destroyed by the next protocol sync, which is worse than\n * being rejected, because it works until it silently does not. Fix\n * provider/actions/folder-create.json (or weaver's template/) and regenerate:\n *\n * npm run provider -- google_drive\n */\n\n/**\n * Google Drive folder — Create a folder in Google Drive.\n *\n * https://developers.google.com/workspace/drive/api/reference/rest/v3/files/create\n *\n * `unsafe-to-replay`.\n */\n\nimport type { NodeKindDefinition } from \"@particle-academy/fancy-flow/engine\";\nimport { defineConnectorKind, summarize, type OutputField } from \"@particle-academy/fancy-flow/connectors\";\nimport { googleDriveMeta } from \"../service.js\";\n\nexport const GOOGLE_DRIVE_FOLDER_KIND = \"@particle-academy/google_drive_folder\";\nexport const GOOGLE_DRIVE_FOLDER_OPERATION = \"folder_create\";\n\nexport const GOOGLE_DRIVE_FOLDER_META = googleDriveMeta(\"action\", \"create a folder\", \"https://developers.google.com/workspace/drive/api/reference/rest/v3/files/create\");\n\n/**\n * What this node emits — the \"ingredients\" a downstream node can reference.\n *\n * fancy-flow reads `outputShape` off the kind and offers it in the variable\n * picker, so declaring it is the whole of the work: an author configuring the\n * next node picks `{{ $json.data.id }}` off a list instead of typing a path\n * and hoping.\n */\nexport const GOOGLE_DRIVE_FOLDER_OUTPUT: OutputField[] = [\n {\n \"path\": \"data.id\",\n \"type\": \"string\",\n \"description\": \"The created folder's id.\"\n },\n {\n \"path\": \"data.name\",\n \"type\": \"string\",\n \"description\": \"The folder name Google stored.\"\n },\n {\n \"path\": \"data.mimeType\",\n \"type\": \"string\",\n \"description\": \"The fixed Google Drive folder MIME type.\"\n },\n {\n \"path\": \"data.parents\",\n \"type\": \"array\",\n \"description\": \"The parent folder id array returned by Drive.\"\n }\n];\n\nexport const googleDriveFolderKind: NodeKindDefinition = defineConnectorKind(GOOGLE_DRIVE_FOLDER_META, {\n name: GOOGLE_DRIVE_FOLDER_KIND,\n aliases: [\"google_drive_folder\"],\n label: \"Google Drive folder\",\n description: \"Create a folder in Google Drive.\",\n inputs: [{ id: \"in\" }],\n outputs: [{ id: \"out\" }],\n sideEffects: \"unsafe-to-replay\",\n outputShape: GOOGLE_DRIVE_FOLDER_OUTPUT,\n configSchema: [\n {\n \"type\": \"text\",\n \"key\": \"name\",\n \"label\": \"Folder name\",\n \"required\": true,\n \"description\": \"The folder name. Drive does not require names to be unique within a parent.\"\n },\n {\n \"type\": \"text\",\n \"key\": \"parents\",\n \"label\": \"Parent folder IDs\",\n \"description\": \"Parent folder ids, comma separated. Leave empty to create the folder in My Drive.\"\n }\n ],\n defaultConfig: {\n \"mode\": \"auto\"\n },\n renderBody: ({ config }) =>\n summarize(GOOGLE_DRIVE_FOLDER_META, config as Record<string, unknown>, \"create a folder\"),\n});\n","/**\n * GENERATED FILE — do not edit.\n *\n * Emitted from provider/manifest.json by weaver's generator.\n * A hand-edit here is destroyed by the next protocol sync, which is worse than\n * being rejected, because it works until it silently does not. Fix\n * provider/manifest.json (or weaver's template/) and regenerate:\n *\n * npm run provider -- google_drive\n */\n\n/**\n * Google Drive's node kinds for fancy-flow.\n *\n * Install this on every host. The TypeScript executors live in the js\n * package's `./flow` subpath; PHP and Python hosts run their own and need only\n * this.\n */\n\nexport * from \"./service.js\";\nexport * from \"./kinds/folder-create.js\";\n\nimport type { NodeKindDefinition } from \"@particle-academy/fancy-flow/engine\";\nimport { googleDriveFolderKind } from \"./kinds/folder-create.js\";\n\n/** Every Google Drive kind, for a host that registers the lot. */\nexport const GOOGLE_DRIVE_KINDS: NodeKindDefinition[] = [\n googleDriveFolderKind,\n];\n"]}
1
+ {"version":3,"sources":["../src/service.ts","../src/kinds/folder-create.ts","../src/index.ts"],"names":[],"mappings":";;;AAiCO,IAAM,qBAAA,GAAwB;AAG9B,IAAM,oBAAA,GAAuB;AAAA,EAClC,OAAA,EAAS,cAAA;AAAA,EACT,YAAA,EAAc,cAAA;AAAA,EACd,MAAA,EAAQ,cAAA;AAAA,EACR,OAAA,EAAS;AACX;AA+BO,IAAM,wBAAA,GAA2B;AAAA,EACtC;AAAA,IACE,KAAA,EAAO,UAAA;A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AiB;AAC5F,CAAC;;;AC9DM,IAAM,kBAAA,GAA2C;AAAA,EACtD;AACF","file":"index.js","sourcesContent":["/**\n * GENERATED FILE — do not edit.\n *\n * Emitted from provider/manifest.json by weaver's generator.\n * A hand-edit here is destroyed by the next protocol sync, which is worse than\n * being rejected, because it works until it silently does not. Fix\n * provider/manifest.json (or weaver's template/) and regenerate:\n *\n * npm run provider -- google_drive\n */\n\n/**\n * Google Drive's identity on the authoring surface, shared by every Google\n * Drive node.\n *\n * This file must import nothing from the js package: a PHP or Python project\n * installs the ui package and never that one, and the import would be a\n * dangling module the moment it did.\n *\n * ## The sandbox trap\n *\n * Google Drive has no sandbox. Every folder created in live mode is real; use\n * the faker during development and delete live test folders afterward.\n */\n\nimport type { ConnectorDomain, ConnectorMeta } from \"@particle-academy/fancy-flow/connectors\";\n\n/**\n * The connector API version this package was GENERATED against.\n *\n * A literal, never imported — an imported constant lets an upgrade rewrite the\n * very claim it exists to detect.\n */\nexport const CONNECTOR_API_VERSION = 1;\n\n/** The parts of a connector's identity that belong to the SERVICE, not the node. */\nexport const GOOGLE_DRIVE_SERVICE = {\n service: \"google_drive\",\n serviceTitle: \"Google Drive\",\n domain: \"productivity\",\n sandbox: \"none\",\n} as const satisfies Pick<ConnectorMeta, \"service\" | \"serviceTitle\" | \"domain\" | \"sandbox\">;\n\n/**\n * Every connector domain weaver knows, pinned against fancy-flow's union.\n *\n * A closed set copied into three codebases stays correct only while something\n * MAKES it: this line fails to compile the moment weaver carries a value\n * fancy-flow does not, including the values no provider uses yet.\n */\nconst WEAVER_DOMAINS: readonly ConnectorDomain[] = [\n \"payments\",\n \"commerce\",\n \"messaging\",\n \"email\",\n \"crm\",\n \"support\",\n \"storage\",\n \"calendar\",\n \"productivity\",\n \"database\",\n \"devtools\",\n \"analytics\",\n \"marketing\",\n \"ai\",\n \"forms\",\n \"hr\",\n \"geo\"\n];\nvoid WEAVER_DOMAINS;\n\n/** The credentials a Google Drive connection holds. */\nexport const GOOGLE_DRIVE_CREDENTIALS = [\n {\n \"key\": \"clientId\",\n \"label\": \"OAuth client ID\",\n \"scope\": \"provider\",\n \"secret\": false,\n \"help\": \"From Google Cloud Console. One value for the whole installation.\"\n },\n {\n \"key\": \"clientSecret\",\n \"label\": \"OAuth client secret\",\n \"scope\": \"provider\",\n \"secret\": true,\n \"help\": \"The client secret for the same OAuth app.\"\n },\n {\n \"key\": \"accessToken\",\n \"label\": \"Access token\",\n \"scope\": \"account\",\n \"secret\": true,\n \"help\": \"Per connected Google account; expires after one hour.\"\n },\n {\n \"key\": \"refreshToken\",\n \"label\": \"Refresh token\",\n \"scope\": \"account\",\n \"secret\": true,\n \"help\": \"Per connected Google account; the host uses it to refresh the access token.\"\n }\n] as const;\n\n/**\n * The OAuth2 exchange Google Drive requires — DECLARED here, performed by the\n * host.\n *\n * A consent screen needs a browser, a redirect URI and somewhere to persist\n * the result, and all three belong to the host; a package that ran the dance\n * itself would have to own a web server. So this says precisely enough for a\n * host to do it.\n *\n * The access token lasts 3600 seconds. A host that never refreshes will work\n * all afternoon and be broken by morning, which is why the lifetime is stated\n * rather than left to be discovered.\n *\n * Its refresh tokens do NOT rotate: the same one is reusable, so a refresh may\n * safely be retried and may run concurrently. That is stated rather than\n * assumed because the opposite — a provider that spends the token and revokes\n * the grant on a replay — looks identical until it happens.\n */\nexport const GOOGLE_DRIVE_OAUTH = {\n \"flow\": \"authorization_code\",\n \"authorizeUrl\": \"https://accounts.google.com/o/oauth2/v2/auth\",\n \"tokenUrl\": \"https://oauth2.googleapis.com/token\",\n \"scopes\": [\n \"https://www.googleapis.com/auth/drive.file\"\n ],\n \"accessTokenCredential\": \"accessToken\",\n \"refreshTokenCredential\": \"refreshToken\",\n \"refreshTokenRotates\": false,\n \"accessTokenTtlSeconds\": 3600\n} as const;\n\n/** Build a Google Drive node's connector metadata from the operation it performs. */\nexport function googleDriveMeta(\n role: ConnectorMeta[\"role\"],\n operation: string,\n docs: string,\n): ConnectorMeta {\n return { ...GOOGLE_DRIVE_SERVICE, role, operation, docs };\n}\n","/**\n * GENERATED FILE — do not edit.\n *\n * Emitted from provider/actions/folder-create.json by weaver's generator.\n * A hand-edit here is destroyed by the next protocol sync, which is worse than\n * being rejected, because it works until it silently does not. Fix\n * provider/actions/folder-create.json (or weaver's template/) and regenerate:\n *\n * npm run provider -- google_drive\n */\n\n/**\n * Google Drive folder — Create a folder in Google Drive.\n *\n * https://developers.google.com/workspace/drive/api/reference/rest/v3/files/create\n *\n * `unsafe-to-replay`.\n */\n\nimport type { NodeKindDefinition } from \"@particle-academy/fancy-flow/engine\";\nimport { defineConnectorKind, summarize, type OutputField } from \"@particle-academy/fancy-flow/connectors\";\nimport { googleDriveMeta } from \"../service.js\";\n\nexport const GOOGLE_DRIVE_FOLDER_KIND = \"@particle-academy/google_drive_folder\";\nexport const GOOGLE_DRIVE_FOLDER_OPERATION = \"folder_create\";\n\nexport const GOOGLE_DRIVE_FOLDER_META = googleDriveMeta(\"action\", \"create a folder\", \"https://developers.google.com/workspace/drive/api/reference/rest/v3/files/create\");\n\n/**\n * What this node emits — the \"ingredients\" a downstream node can reference.\n *\n * fancy-flow reads `outputShape` off the kind and offers it in the variable\n * picker, so declaring it is the whole of the work: an author configuring the\n * next node picks `{{ $json.data.id }}` off a list instead of typing a path\n * and hoping.\n */\nexport const GOOGLE_DRIVE_FOLDER_OUTPUT: OutputField[] = [\n {\n \"path\": \"data.id\",\n \"type\": \"string\",\n \"description\": \"The created folder's id.\"\n },\n {\n \"path\": \"data.name\",\n \"type\": \"string\",\n \"description\": \"The folder name Google stored.\"\n },\n {\n \"path\": \"data.mimeType\",\n \"type\": \"string\",\n \"description\": \"The fixed Google Drive folder MIME type.\"\n },\n {\n \"path\": \"data.parents\",\n \"type\": \"array\",\n \"description\": \"The parent folder id array returned by Drive.\"\n }\n];\n\nexport const googleDriveFolderKind: NodeKindDefinition = defineConnectorKind(GOOGLE_DRIVE_FOLDER_META, {\n name: GOOGLE_DRIVE_FOLDER_KIND,\n aliases: [\"google_drive_folder\"],\n label: \"Google Drive folder\",\n description: \"Create a folder in Google Drive.\",\n inputs: [{ id: \"in\" }],\n outputs: [{ id: \"out\" }],\n sideEffects: \"unsafe-to-replay\",\n outputShape: GOOGLE_DRIVE_FOLDER_OUTPUT,\n configSchema: [\n {\n \"type\": \"text\",\n \"key\": \"name\",\n \"label\": \"Folder name\",\n \"required\": true,\n \"description\": \"The folder name. Drive does not require names to be unique within a parent.\"\n },\n {\n \"type\": \"text\",\n \"key\": \"parents\",\n \"label\": \"Parent folder IDs\",\n \"description\": \"Parent folder ids, comma separated. Leave empty to create the folder in My Drive.\"\n }\n ],\n defaultConfig: {\n \"mode\": \"auto\"\n },\n renderBody: ({ config }) =>\n summarize(GOOGLE_DRIVE_FOLDER_META, config as Record<string, unknown>, \"create a folder\"),\n});\n","/**\n * GENERATED FILE — do not edit.\n *\n * Emitted from provider/manifest.json by weaver's generator.\n * A hand-edit here is destroyed by the next protocol sync, which is worse than\n * being rejected, because it works until it silently does not. Fix\n * provider/manifest.json (or weaver's template/) and regenerate:\n *\n * npm run provider -- google_drive\n */\n\n/**\n * Google Drive's node kinds for fancy-flow.\n *\n * Install this on every host. The TypeScript executors live in the js\n * package's `./flow` subpath; PHP and Python hosts run their own and need only\n * this.\n */\n\nexport * from \"./service.js\";\nexport * from \"./kinds/folder-create.js\";\n\nimport type { NodeKindDefinition } from \"@particle-academy/fancy-flow/engine\";\nimport { googleDriveFolderKind } from \"./kinds/folder-create.js\";\n\n/** Every Google Drive kind, for a host that registers the lot. */\nexport const GOOGLE_DRIVE_KINDS: NodeKindDefinition[] = [\n googleDriveFolderKind,\n];\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@particle-academy/google-drive-ui",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "Google Drive's authoring surface for fancy-flow — the node kinds, their config schemas and their declared output shapes. React on every host; carries no executor.",
5
5
  "repository": {
6
6
  "type": "git",