@payloadcms/figma 0.0.1-alpha.3 → 0.0.1-alpha.30
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/dist/api/control-plane.d.ts +22 -1
- package/dist/api/control-plane.d.ts.map +1 -1
- package/dist/api/control-plane.js +54 -15
- package/dist/api/control-plane.js.map +1 -1
- package/dist/api/figma-api.d.ts.map +1 -1
- package/dist/api/figma-api.js +42 -12
- package/dist/api/figma-api.js.map +1 -1
- package/dist/auth/callback-server.d.ts.map +1 -1
- package/dist/auth/callback-server.js +2 -1
- package/dist/auth/callback-server.js.map +1 -1
- package/dist/auth/crypto-utils.d.ts.map +1 -1
- package/dist/auth/crypto-utils.js +5 -5
- package/dist/auth/crypto-utils.js.map +1 -1
- package/dist/auth/oauth-flow.d.ts +1 -1
- package/dist/auth/oauth-flow.d.ts.map +1 -1
- package/dist/auth/oauth-flow.js +5 -5
- package/dist/auth/oauth-flow.js.map +1 -1
- package/dist/auth/project-token.d.ts.map +1 -1
- package/dist/auth/project-token.js +9 -4
- package/dist/auth/project-token.js.map +1 -1
- package/dist/auth/token-store.d.ts +10 -0
- package/dist/auth/token-store.d.ts.map +1 -1
- package/dist/auth/token-store.js +20 -0
- package/dist/auth/token-store.js.map +1 -1
- package/dist/cli.js +3 -0
- package/dist/cli.js.map +1 -1
- package/dist/commands/deploy.d.ts +4 -0
- package/dist/commands/deploy.d.ts.map +1 -1
- package/dist/commands/deploy.js +68 -126
- package/dist/commands/deploy.js.map +1 -1
- package/dist/commands/init.d.ts +1 -5
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +90 -85
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/list-tokens.js +2 -2
- package/dist/commands/list-tokens.js.map +1 -1
- package/dist/commands/login.d.ts +8 -1
- package/dist/commands/login.d.ts.map +1 -1
- package/dist/commands/login.js +12 -6
- package/dist/commands/login.js.map +1 -1
- package/dist/commands/logout.js +2 -2
- package/dist/commands/logout.js.map +1 -1
- package/dist/config/oauth.d.ts +5 -0
- package/dist/config/oauth.d.ts.map +1 -1
- package/dist/config/oauth.js +9 -4
- package/dist/config/oauth.js.map +1 -1
- package/dist/db-content-api/README.md +108 -0
- package/dist/db-content-api/generated/content-api-types.d.ts +3702 -0
- package/dist/db-content-api/generated/content-api-types.d.ts.map +1 -0
- package/dist/db-content-api/generated/content-api-types.js +7 -0
- package/dist/db-content-api/generated/content-api-types.js.map +1 -0
- package/dist/db-content-api/index.d.ts +18 -0
- package/dist/db-content-api/index.d.ts.map +1 -0
- package/dist/db-content-api/index.js +551 -0
- package/dist/db-content-api/index.js.map +1 -0
- package/dist/db-content-api/temp-utilities/pagination.d.ts +13 -0
- package/dist/db-content-api/temp-utilities/pagination.d.ts.map +1 -0
- package/dist/db-content-api/temp-utilities/pagination.js +45 -0
- package/dist/db-content-api/temp-utilities/pagination.js.map +1 -0
- package/dist/db-content-api/temp-utilities/slug.d.ts +2 -0
- package/dist/db-content-api/temp-utilities/slug.d.ts.map +1 -0
- package/dist/db-content-api/temp-utilities/slug.js +3 -0
- package/dist/db-content-api/temp-utilities/slug.js.map +1 -0
- package/dist/db-content-api/temp-utilities/sorting.d.ts +7 -0
- package/dist/db-content-api/temp-utilities/sorting.d.ts.map +1 -0
- package/dist/db-content-api/temp-utilities/sorting.js +71 -0
- package/dist/db-content-api/temp-utilities/sorting.js.map +1 -0
- package/dist/db-content-api/temp-utilities/unwrapDocument.d.ts +4 -0
- package/dist/db-content-api/temp-utilities/unwrapDocument.d.ts.map +1 -0
- package/dist/db-content-api/temp-utilities/unwrapDocument.js +45 -0
- package/dist/db-content-api/temp-utilities/unwrapDocument.js.map +1 -0
- package/dist/db-content-api/utilities/auth.d.ts +30 -0
- package/dist/db-content-api/utilities/auth.d.ts.map +1 -0
- package/dist/db-content-api/utilities/auth.js +81 -0
- package/dist/db-content-api/utilities/auth.js.map +1 -0
- package/dist/db-content-api/utilities/data.d.ts +24 -0
- package/dist/db-content-api/utilities/data.d.ts.map +1 -0
- package/dist/db-content-api/utilities/data.js +118 -0
- package/dist/db-content-api/utilities/data.js.map +1 -0
- package/dist/db-content-api/utilities/joins.d.ts +55 -0
- package/dist/db-content-api/utilities/joins.d.ts.map +1 -0
- package/dist/db-content-api/utilities/joins.js +130 -0
- package/dist/db-content-api/utilities/joins.js.map +1 -0
- package/dist/db-content-api/utilities/where.d.ts +12 -0
- package/dist/db-content-api/utilities/where.d.ts.map +1 -0
- package/dist/db-content-api/utilities/where.js +63 -0
- package/dist/db-content-api/utilities/where.js.map +1 -0
- package/dist/endpoints/health.d.ts +3 -0
- package/dist/endpoints/health.d.ts.map +1 -0
- package/dist/endpoints/health.js +11 -0
- package/dist/endpoints/health.js.map +1 -0
- package/dist/exports/client.d.ts +3 -0
- package/dist/exports/client.d.ts.map +1 -0
- package/dist/exports/client.js +4 -0
- package/dist/exports/client.js.map +1 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/oauth/components/LoginButton/index.d.ts.map +1 -1
- package/dist/oauth/components/LoginButton/index.js +50 -6
- package/dist/oauth/components/LoginButton/index.js.map +1 -1
- package/dist/oauth/components/LoginButton/index.scss +50 -3
- package/dist/oauth/components/LogoutButton/index.d.ts.map +1 -1
- package/dist/oauth/components/LogoutButton/index.js +0 -1
- package/dist/oauth/components/LogoutButton/index.js.map +1 -1
- package/dist/oauth/defaults.d.ts.map +1 -1
- package/dist/oauth/defaults.js +29 -5
- package/dist/oauth/defaults.js.map +1 -1
- package/dist/oauth/endpoints/getLoginEndpoint.d.ts.map +1 -1
- package/dist/oauth/endpoints/getLoginEndpoint.js +1 -1
- package/dist/oauth/endpoints/getLoginEndpoint.js.map +1 -1
- package/dist/oauth/index.d.ts.map +1 -1
- package/dist/oauth/index.js +42 -6
- package/dist/oauth/index.js.map +1 -1
- package/dist/oauth/strategy/index.d.ts.map +1 -1
- package/dist/oauth/strategy/index.js +6 -2
- package/dist/oauth/strategy/index.js.map +1 -1
- package/dist/oauth/types.d.ts +6 -6
- package/dist/oauth/types.d.ts.map +1 -1
- package/dist/oauth/types.js.map +1 -1
- package/dist/oauth/utilities/createCookieOptions.d.ts.map +1 -1
- package/dist/oauth/utilities/createCookieOptions.js.map +1 -1
- package/dist/oauth/utilities/isDuplicateKeyError.d.ts +7 -0
- package/dist/oauth/utilities/isDuplicateKeyError.d.ts.map +1 -0
- package/dist/oauth/utilities/isDuplicateKeyError.js +14 -0
- package/dist/oauth/utilities/isDuplicateKeyError.js.map +1 -0
- package/dist/oauth/utilities/refreshTokens.d.ts.map +1 -1
- package/dist/oauth/utilities/refreshTokens.js +1 -1
- package/dist/oauth/utilities/refreshTokens.js.map +1 -1
- package/dist/plugin/build-config.d.ts +21 -4
- package/dist/plugin/build-config.d.ts.map +1 -1
- package/dist/plugin/build-config.js +89 -9
- package/dist/plugin/build-config.js.map +1 -1
- package/dist/storage-content-api/api-types.d.ts +161 -0
- package/dist/storage-content-api/api-types.d.ts.map +1 -0
- package/dist/storage-content-api/api-types.js +6 -0
- package/dist/storage-content-api/api-types.js.map +1 -0
- package/dist/storage-content-api/client.d.ts +6 -0
- package/dist/storage-content-api/client.d.ts.map +1 -0
- package/dist/storage-content-api/client.js +36 -0
- package/dist/storage-content-api/client.js.map +1 -0
- package/dist/storage-content-api/generateURL.d.ts +7 -0
- package/dist/storage-content-api/generateURL.d.ts.map +1 -0
- package/dist/storage-content-api/generateURL.js +7 -0
- package/dist/storage-content-api/generateURL.js.map +1 -0
- package/dist/storage-content-api/handleDelete.d.ts +8 -0
- package/dist/storage-content-api/handleDelete.d.ts.map +1 -0
- package/dist/storage-content-api/handleDelete.js +15 -0
- package/dist/storage-content-api/handleDelete.js.map +1 -0
- package/dist/storage-content-api/handleUpload.d.ts +11 -0
- package/dist/storage-content-api/handleUpload.d.ts.map +1 -0
- package/dist/storage-content-api/handleUpload.js +126 -0
- package/dist/storage-content-api/handleUpload.js.map +1 -0
- package/dist/storage-content-api/index.d.ts +5 -0
- package/dist/storage-content-api/index.d.ts.map +1 -0
- package/dist/storage-content-api/index.js +31 -0
- package/dist/storage-content-api/index.js.map +1 -0
- package/dist/storage-content-api/staticHandler.d.ts +10 -0
- package/dist/storage-content-api/staticHandler.d.ts.map +1 -0
- package/dist/storage-content-api/staticHandler.js +35 -0
- package/dist/storage-content-api/staticHandler.js.map +1 -0
- package/dist/storage-content-api/types.d.ts +10 -0
- package/dist/storage-content-api/types.d.ts.map +1 -0
- package/dist/storage-content-api/types.js +3 -0
- package/dist/storage-content-api/types.js.map +1 -0
- package/dist/templates/README.md +19 -0
- package/dist/utils/env-management.d.ts +9 -8
- package/dist/utils/env-management.d.ts.map +1 -1
- package/dist/utils/env-management.js +73 -74
- package/dist/utils/env-management.js.map +1 -1
- package/dist/utils/formatter.d.ts.map +1 -1
- package/dist/utils/formatter.js +1 -7
- package/dist/utils/formatter.js.map +1 -1
- package/dist/utils/lambda-config.d.ts.map +1 -1
- package/dist/utils/lambda-config.js +1 -0
- package/dist/utils/lambda-config.js.map +1 -1
- package/dist/utils/messages.d.ts.map +1 -1
- package/dist/utils/messages.js +5 -7
- package/dist/utils/messages.js.map +1 -1
- package/dist/utils/payload-config-ast.d.ts +22 -3
- package/dist/utils/payload-config-ast.d.ts.map +1 -1
- package/dist/utils/payload-config-ast.js +89 -31
- package/dist/utils/payload-config-ast.js.map +1 -1
- package/dist/utils/payload-config-finder.d.ts +2 -2
- package/dist/utils/payload-config-finder.d.ts.map +1 -1
- package/dist/utils/payload-config-finder.js +48 -9
- package/dist/utils/payload-config-finder.js.map +1 -1
- package/dist/utils/payload-config-modifier.d.ts.map +1 -1
- package/dist/utils/payload-config-modifier.js +33 -4
- package/dist/utils/payload-config-modifier.js.map +1 -1
- package/dist/utils/payload-package-check.d.ts +5 -0
- package/dist/utils/payload-package-check.d.ts.map +1 -1
- package/dist/utils/payload-package-check.js +48 -4
- package/dist/utils/payload-package-check.js.map +1 -1
- package/dist/utils/project.d.ts.map +1 -1
- package/dist/utils/project.js +8 -6
- package/dist/utils/project.js.map +1 -1
- package/dist/utils/s3-upload.d.ts +0 -1
- package/dist/utils/s3-upload.d.ts.map +1 -1
- package/dist/utils/s3-upload.js +10 -3
- package/dist/utils/s3-upload.js.map +1 -1
- package/dist/utils/token-display.d.ts.map +1 -1
- package/dist/utils/token-display.js +11 -5
- package/dist/utils/token-display.js.map +1 -1
- package/dist/utils/typescript-validator.d.ts.map +1 -1
- package/dist/utils/typescript-validator.js +1 -6
- package/dist/utils/typescript-validator.js.map +1 -1
- package/package.json +24 -7
|
@@ -37,27 +37,33 @@ import { isDebug } from './is-debug.js';
|
|
|
37
37
|
// Get all tenant IDs that have project tokens
|
|
38
38
|
const tenantIds = tokenStore.getAllProjectTokenTenantIds();
|
|
39
39
|
if (tenantIds.length === 0) {
|
|
40
|
-
p.
|
|
41
|
-
p.note(`Run ${pc.cyan('@payloadcms/figma init')} to create a CMS instance`, 'Tip');
|
|
40
|
+
p.note(pc.dim('No project tokens stored.'), `Project Tokens`);
|
|
42
41
|
return;
|
|
43
42
|
}
|
|
44
43
|
const projectTokenLines = [];
|
|
45
|
-
|
|
44
|
+
let displayedCount = 0;
|
|
45
|
+
tenantIds.forEach((tenantId)=>{
|
|
46
46
|
const projectToken = tokenStore.getProjectToken(tenantId);
|
|
47
47
|
if (!projectToken) {
|
|
48
48
|
return;
|
|
49
49
|
}
|
|
50
50
|
const isValid = tokenStore.hasValidProjectToken(tenantId);
|
|
51
51
|
const status = isValid ? pc.green('✓ Valid') : pc.red('✗ Expired');
|
|
52
|
-
if (
|
|
52
|
+
if (displayedCount > 0) {
|
|
53
53
|
projectTokenLines.push(''); // Blank line between tokens
|
|
54
54
|
}
|
|
55
55
|
projectTokenLines.push(`Tenant ID: ${tenantId}`);
|
|
56
56
|
projectTokenLines.push(`Status: ${status}`);
|
|
57
57
|
projectTokenLines.push(`Token: ${isDebug() ? projectToken.token : maskToken(projectToken.token)}`);
|
|
58
58
|
projectTokenLines.push(`Expires: ${formatTimestamp(projectToken.expiresAt)}`);
|
|
59
|
+
displayedCount++;
|
|
59
60
|
});
|
|
60
|
-
|
|
61
|
+
// Handle case where all tokens were expired and auto-cleaned
|
|
62
|
+
if (displayedCount === 0) {
|
|
63
|
+
p.note(pc.dim('No project tokens stored.'), `Project Tokens`);
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
p.note(projectTokenLines.join('\n'), `Project Tokens (${displayedCount})`);
|
|
61
67
|
}
|
|
62
68
|
|
|
63
69
|
//# sourceMappingURL=token-display.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/utils/token-display.ts"],"sourcesContent":["import * as p from '@clack/prompts'\nimport pc from 'picocolors'\n\nimport type { TokenStore } from '../auth/token-store.js'\n\nimport { isDebug } from './is-debug.js'\n\n/**\n * Mask token for display (show first 4 and last 4 characters)\n */\nexport function maskToken(token: string): string {\n if (token.length <= 8) {\n return '***'\n }\n return `${token.slice(0, 4)}${'*'.repeat(Math.min(token.length - 8, 32))}${token.slice(-4)}`\n}\n\n/**\n * Format timestamp as human-readable string with color coding\n */\nexport function formatTimestamp(timestamp: number): string {\n const now = Date.now()\n const diff = timestamp - now\n\n if (diff < 0) {\n return pc.red('Expired')\n }\n\n const minutes = Math.floor(diff / 60000)\n const hours = Math.floor(minutes / 60)\n const days = Math.floor(hours / 24)\n\n if (days > 0) {\n return pc.green(`${days}d ${hours % 24}h`)\n }\n if (hours > 0) {\n return pc.green(`${hours}h ${minutes % 60}m`)\n }\n if (minutes > 5) {\n return pc.yellow(`${minutes}m`)\n }\n return pc.red(`${minutes}m`)\n}\n\n/**\n * Show all stored project tokens\n */\nexport function showProjectTokens(tokenStore: TokenStore): void {\n // Get all tenant IDs that have project tokens\n const tenantIds = tokenStore.getAllProjectTokenTenantIds()\n\n if (tenantIds.length === 0) {\n p.
|
|
1
|
+
{"version":3,"sources":["../../src/utils/token-display.ts"],"sourcesContent":["import * as p from '@clack/prompts'\nimport pc from 'picocolors'\n\nimport type { TokenStore } from '../auth/token-store.js'\n\nimport { isDebug } from './is-debug.js'\n\n/**\n * Mask token for display (show first 4 and last 4 characters)\n */\nexport function maskToken(token: string): string {\n if (token.length <= 8) {\n return '***'\n }\n return `${token.slice(0, 4)}${'*'.repeat(Math.min(token.length - 8, 32))}${token.slice(-4)}`\n}\n\n/**\n * Format timestamp as human-readable string with color coding\n */\nexport function formatTimestamp(timestamp: number): string {\n const now = Date.now()\n const diff = timestamp - now\n\n if (diff < 0) {\n return pc.red('Expired')\n }\n\n const minutes = Math.floor(diff / 60000)\n const hours = Math.floor(minutes / 60)\n const days = Math.floor(hours / 24)\n\n if (days > 0) {\n return pc.green(`${days}d ${hours % 24}h`)\n }\n if (hours > 0) {\n return pc.green(`${hours}h ${minutes % 60}m`)\n }\n if (minutes > 5) {\n return pc.yellow(`${minutes}m`)\n }\n return pc.red(`${minutes}m`)\n}\n\n/**\n * Show all stored project tokens\n */\nexport function showProjectTokens(tokenStore: TokenStore): void {\n // Get all tenant IDs that have project tokens\n const tenantIds = tokenStore.getAllProjectTokenTenantIds()\n\n if (tenantIds.length === 0) {\n p.note(pc.dim('No project tokens stored.'), `Project Tokens`)\n return\n }\n const projectTokenLines: string[] = []\n let displayedCount = 0\n\n tenantIds.forEach((tenantId) => {\n const projectToken = tokenStore.getProjectToken(tenantId)\n\n if (!projectToken) {\n return\n }\n\n const isValid = tokenStore.hasValidProjectToken(tenantId)\n const status = isValid ? pc.green('✓ Valid') : pc.red('✗ Expired')\n\n if (displayedCount > 0) {\n projectTokenLines.push('') // Blank line between tokens\n }\n\n projectTokenLines.push(`Tenant ID: ${tenantId}`)\n projectTokenLines.push(`Status: ${status}`)\n projectTokenLines.push(\n `Token: ${isDebug() ? projectToken.token : maskToken(projectToken.token)}`,\n )\n projectTokenLines.push(`Expires: ${formatTimestamp(projectToken.expiresAt)}`)\n displayedCount++\n })\n\n // Handle case where all tokens were expired and auto-cleaned\n if (displayedCount === 0) {\n p.note(pc.dim('No project tokens stored.'), `Project Tokens`)\n return\n }\n\n p.note(projectTokenLines.join('\\n'), `Project Tokens (${displayedCount})`)\n}\n"],"names":["p","pc","isDebug","maskToken","token","length","slice","repeat","Math","min","formatTimestamp","timestamp","now","Date","diff","red","minutes","floor","hours","days","green","yellow","showProjectTokens","tokenStore","tenantIds","getAllProjectTokenTenantIds","note","dim","projectTokenLines","displayedCount","forEach","tenantId","projectToken","getProjectToken","isValid","hasValidProjectToken","status","push","expiresAt","join"],"mappings":"AAAA,YAAYA,OAAO,iBAAgB;AACnC,OAAOC,QAAQ,aAAY;AAI3B,SAASC,OAAO,QAAQ,gBAAe;AAEvC;;CAEC,GACD,OAAO,SAASC,UAAUC,KAAa;IACrC,IAAIA,MAAMC,MAAM,IAAI,GAAG;QACrB,OAAO;IACT;IACA,OAAO,GAAGD,MAAME,KAAK,CAAC,GAAG,KAAK,IAAIC,MAAM,CAACC,KAAKC,GAAG,CAACL,MAAMC,MAAM,GAAG,GAAG,OAAOD,MAAME,KAAK,CAAC,CAAC,IAAI;AAC9F;AAEA;;CAEC,GACD,OAAO,SAASI,gBAAgBC,SAAiB;IAC/C,MAAMC,MAAMC,KAAKD,GAAG;IACpB,MAAME,OAAOH,YAAYC;IAEzB,IAAIE,OAAO,GAAG;QACZ,OAAOb,GAAGc,GAAG,CAAC;IAChB;IAEA,MAAMC,UAAUR,KAAKS,KAAK,CAACH,OAAO;IAClC,MAAMI,QAAQV,KAAKS,KAAK,CAACD,UAAU;IACnC,MAAMG,OAAOX,KAAKS,KAAK,CAACC,QAAQ;IAEhC,IAAIC,OAAO,GAAG;QACZ,OAAOlB,GAAGmB,KAAK,CAAC,GAAGD,KAAK,EAAE,EAAED,QAAQ,GAAG,CAAC,CAAC;IAC3C;IACA,IAAIA,QAAQ,GAAG;QACb,OAAOjB,GAAGmB,KAAK,CAAC,GAAGF,MAAM,EAAE,EAAEF,UAAU,GAAG,CAAC,CAAC;IAC9C;IACA,IAAIA,UAAU,GAAG;QACf,OAAOf,GAAGoB,MAAM,CAAC,GAAGL,QAAQ,CAAC,CAAC;IAChC;IACA,OAAOf,GAAGc,GAAG,CAAC,GAAGC,QAAQ,CAAC,CAAC;AAC7B;AAEA;;CAEC,GACD,OAAO,SAASM,kBAAkBC,UAAsB;IACtD,8CAA8C;IAC9C,MAAMC,YAAYD,WAAWE,2BAA2B;IAExD,IAAID,UAAUnB,MAAM,KAAK,GAAG;QAC1BL,EAAE0B,IAAI,CAACzB,GAAG0B,GAAG,CAAC,8BAA8B,CAAC,cAAc,CAAC;QAC5D;IACF;IACA,MAAMC,oBAA8B,EAAE;IACtC,IAAIC,iBAAiB;IAErBL,UAAUM,OAAO,CAAC,CAACC;QACjB,MAAMC,eAAeT,WAAWU,eAAe,CAACF;QAEhD,IAAI,CAACC,cAAc;YACjB;QACF;QAEA,MAAME,UAAUX,WAAWY,oBAAoB,CAACJ;QAChD,MAAMK,SAASF,UAAUjC,GAAGmB,KAAK,CAAC,aAAanB,GAAGc,GAAG,CAAC;QAEtD,IAAIc,iBAAiB,GAAG;YACtBD,kBAAkBS,IAAI,CAAC,KAAI,4BAA4B;QACzD;QAEAT,kBAAkBS,IAAI,CAAC,CAAC,gBAAgB,EAAEN,UAAU;QACpDH,kBAAkBS,IAAI,CAAC,CAAC,gBAAgB,EAAED,QAAQ;QAClDR,kBAAkBS,IAAI,CACpB,CAAC,gBAAgB,EAAEnC,YAAY8B,aAAa5B,KAAK,GAAGD,UAAU6B,aAAa5B,KAAK,GAAG;QAErFwB,kBAAkBS,IAAI,CAAC,CAAC,gBAAgB,EAAE3B,gBAAgBsB,aAAaM,SAAS,GAAG;QACnFT;IACF;IAEA,6DAA6D;IAC7D,IAAIA,mBAAmB,GAAG;QACxB7B,EAAE0B,IAAI,CAACzB,GAAG0B,GAAG,CAAC,8BAA8B,CAAC,cAAc,CAAC;QAC5D;IACF;IAEA3B,EAAE0B,IAAI,CAACE,kBAAkBW,IAAI,CAAC,OAAO,CAAC,gBAAgB,EAAEV,eAAe,CAAC,CAAC;AAC3E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typescript-validator.d.ts","sourceRoot":"","sources":["../../src/utils/typescript-validator.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAE1D,MAAM,MAAM,qBAAqB,GAAG;IAClC,MAAM,EAAE,MAAM,EAAE,CAAA;IAChB,OAAO,EAAE,OAAO,CAAA;CACjB,CAAA;AAED;;;GAGG;AACH,wBAAsB,kBAAkB,CACtC,WAAW,EAAE,MAAM,EACnB,cAAc,EAAE,cAAc,GAC7B,OAAO,CAAC,qBAAqB,CAAC,
|
|
1
|
+
{"version":3,"file":"typescript-validator.d.ts","sourceRoot":"","sources":["../../src/utils/typescript-validator.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAE1D,MAAM,MAAM,qBAAqB,GAAG;IAClC,MAAM,EAAE,MAAM,EAAE,CAAA;IAChB,OAAO,EAAE,OAAO,CAAA;CACjB,CAAA;AAED;;;GAGG;AACH,wBAAsB,kBAAkB,CACtC,WAAW,EAAE,MAAM,EACnB,cAAc,EAAE,cAAc,GAC7B,OAAO,CAAC,qBAAqB,CAAC,CAiChC"}
|
|
@@ -5,12 +5,7 @@ import { spawn } from 'child_process';
|
|
|
5
5
|
*/ export async function runTypeScriptCheck(projectPath, packageManager) {
|
|
6
6
|
return new Promise((resolve)=>{
|
|
7
7
|
try {
|
|
8
|
-
const
|
|
9
|
-
'exec',
|
|
10
|
-
'tsc',
|
|
11
|
-
'--noEmit'
|
|
12
|
-
];
|
|
13
|
-
const child = spawn(packageManager, args, {
|
|
8
|
+
const child = spawn(`${packageManager} exec tsc --noEmit`, {
|
|
14
9
|
cwd: projectPath,
|
|
15
10
|
shell: true,
|
|
16
11
|
stdio: 'pipe'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/utils/typescript-validator.ts"],"sourcesContent":["import { spawn } from 'child_process'\n\nimport type { PackageManager } from './package-manager.js'\n\nexport type TypeScriptCheckResult = {\n errors: string[]\n success: boolean\n}\n\n/**\n * Run TypeScript type checking (tsc --noEmit)\n * Skips silently if TypeScript not available\n */\nexport async function runTypeScriptCheck(\n projectPath: string,\n packageManager: PackageManager,\n): Promise<TypeScriptCheckResult> {\n return new Promise((resolve) => {\n try {\n const
|
|
1
|
+
{"version":3,"sources":["../../src/utils/typescript-validator.ts"],"sourcesContent":["import { spawn } from 'child_process'\n\nimport type { PackageManager } from './package-manager.js'\n\nexport type TypeScriptCheckResult = {\n errors: string[]\n success: boolean\n}\n\n/**\n * Run TypeScript type checking (tsc --noEmit)\n * Skips silently if TypeScript not available\n */\nexport async function runTypeScriptCheck(\n projectPath: string,\n packageManager: PackageManager,\n): Promise<TypeScriptCheckResult> {\n return new Promise((resolve) => {\n try {\n const child = spawn(`${packageManager} exec tsc --noEmit`, {\n cwd: projectPath,\n shell: true,\n stdio: 'pipe',\n })\n\n let output = ''\n\n child.stdout?.on('data', (data) => {\n output += data.toString()\n })\n\n child.on('close', (code) => {\n if (code === 0) {\n resolve({ errors: [], success: true })\n } else {\n const errors = parseTypeScriptErrors(output)\n resolve({ errors, success: false })\n }\n })\n\n child.on('error', () => {\n // tsc not available - skip validation\n resolve({ errors: [], success: true })\n })\n } catch {\n // Skip validation if error\n resolve({ errors: [], success: true })\n }\n })\n}\n\n/**\n * Parse TypeScript error output\n */\nfunction parseTypeScriptErrors(output: string): string[] {\n return output\n .split('\\n')\n .filter((line) => line.includes('error TS'))\n .map((line) => line.trim())\n}\n"],"names":["spawn","runTypeScriptCheck","projectPath","packageManager","Promise","resolve","child","cwd","shell","stdio","output","stdout","on","data","toString","code","errors","success","parseTypeScriptErrors","split","filter","line","includes","map","trim"],"mappings":"AAAA,SAASA,KAAK,QAAQ,gBAAe;AASrC;;;CAGC,GACD,OAAO,eAAeC,mBACpBC,WAAmB,EACnBC,cAA8B;IAE9B,OAAO,IAAIC,QAAQ,CAACC;QAClB,IAAI;YACF,MAAMC,QAAQN,MAAM,GAAGG,eAAe,kBAAkB,CAAC,EAAE;gBACzDI,KAAKL;gBACLM,OAAO;gBACPC,OAAO;YACT;YAEA,IAAIC,SAAS;YAEbJ,MAAMK,MAAM,EAAEC,GAAG,QAAQ,CAACC;gBACxBH,UAAUG,KAAKC,QAAQ;YACzB;YAEAR,MAAMM,EAAE,CAAC,SAAS,CAACG;gBACjB,IAAIA,SAAS,GAAG;oBACdV,QAAQ;wBAAEW,QAAQ,EAAE;wBAAEC,SAAS;oBAAK;gBACtC,OAAO;oBACL,MAAMD,SAASE,sBAAsBR;oBACrCL,QAAQ;wBAAEW;wBAAQC,SAAS;oBAAM;gBACnC;YACF;YAEAX,MAAMM,EAAE,CAAC,SAAS;gBAChB,sCAAsC;gBACtCP,QAAQ;oBAAEW,QAAQ,EAAE;oBAAEC,SAAS;gBAAK;YACtC;QACF,EAAE,OAAM;YACN,2BAA2B;YAC3BZ,QAAQ;gBAAEW,QAAQ,EAAE;gBAAEC,SAAS;YAAK;QACtC;IACF;AACF;AAEA;;CAEC,GACD,SAASC,sBAAsBR,MAAc;IAC3C,OAAOA,OACJS,KAAK,CAAC,MACNC,MAAM,CAAC,CAACC,OAASA,KAAKC,QAAQ,CAAC,aAC/BC,GAAG,CAAC,CAACF,OAASA,KAAKG,IAAI;AAC5B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@payloadcms/figma",
|
|
3
|
-
"version": "0.0.1-alpha.
|
|
3
|
+
"version": "0.0.1-alpha.30",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -8,6 +8,11 @@
|
|
|
8
8
|
"import": "./dist/index.js",
|
|
9
9
|
"types": "./dist/index.d.ts",
|
|
10
10
|
"default": "./dist/index.js"
|
|
11
|
+
},
|
|
12
|
+
"./client": {
|
|
13
|
+
"import": "./dist/exports/client.js",
|
|
14
|
+
"types": "./dist/exports/client.d.ts",
|
|
15
|
+
"default": "./dist/exports/client.js"
|
|
11
16
|
}
|
|
12
17
|
},
|
|
13
18
|
"main": "./dist/index.js",
|
|
@@ -23,27 +28,37 @@
|
|
|
23
28
|
"dependencies": {
|
|
24
29
|
"@clack/prompts": "^0.11.0",
|
|
25
30
|
"@figma/rest-api-spec": "^0.34.0",
|
|
31
|
+
"@payloadcms/plugin-cloud-storage": "3.66.0",
|
|
26
32
|
"@sindresorhus/slugify": "^3.0.0",
|
|
27
33
|
"arg": "^5.0.2",
|
|
28
34
|
"conf": "^13.0.1",
|
|
29
35
|
"esprima-next": "^6.0.2",
|
|
30
36
|
"figures": "^6.1.0",
|
|
31
37
|
"jose": "6.0.12",
|
|
38
|
+
"jsonwebtoken": "9.0.2",
|
|
32
39
|
"open": "^10.1.0",
|
|
40
|
+
"openapi-fetch": "0.15.0",
|
|
33
41
|
"picocolors": "1.1.1",
|
|
34
42
|
"tar": "^7.4.3",
|
|
35
43
|
"terminal-link": "^5.0.0",
|
|
36
|
-
"ts-morph": "^21.0.0"
|
|
44
|
+
"ts-morph": "^21.0.0",
|
|
45
|
+
"uuid": "^10.0.0"
|
|
37
46
|
},
|
|
38
47
|
"devDependencies": {
|
|
39
48
|
"@types/node": "22.12.0",
|
|
49
|
+
"openapi-typescript": "^7.10.1",
|
|
40
50
|
"tsx": "4.20.6",
|
|
41
51
|
"typescript": "5.9.3",
|
|
42
|
-
"vitest": "
|
|
52
|
+
"vitest": "4.0.15"
|
|
43
53
|
},
|
|
44
54
|
"peerDependencies": {
|
|
45
|
-
"@payloadcms/richtext-lexical": "^3.
|
|
46
|
-
"payload": "^3.
|
|
55
|
+
"@payloadcms/richtext-lexical": "^3.0.0",
|
|
56
|
+
"payload": "^3.0.0"
|
|
57
|
+
},
|
|
58
|
+
"peerDependenciesMeta": {
|
|
59
|
+
"@payloadcms/richtext-lexical": {
|
|
60
|
+
"optional": true
|
|
61
|
+
}
|
|
47
62
|
},
|
|
48
63
|
"publishConfig": {
|
|
49
64
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -51,15 +66,17 @@
|
|
|
51
66
|
"scripts": {
|
|
52
67
|
"build": "pnpm build:swc && pnpm build:types && pnpm copyfiles",
|
|
53
68
|
"build:swc": "swc ./src -d ./dist --config-file .swcrc --strip-leading-paths",
|
|
54
|
-
"build:types": "tsc",
|
|
69
|
+
"build:types": "tsc --project tsconfig.build.json",
|
|
55
70
|
"clean": "rimraf -g \"{dist,*.tsbuildinfo,package}\"",
|
|
56
|
-
"copyfiles": "copyfiles -u 1 \"src/**/*.{html,css,scss,ttf,woff,woff2,eot,svg,jpg,png}\" dist/",
|
|
71
|
+
"copyfiles": "copyfiles -u 1 \"src/**/*.{html,css,scss,ttf,woff,woff2,eot,svg,jpg,png,md}\" dist/",
|
|
57
72
|
"debug:clear-tokens": "tsx scripts/clear-tokens.ts",
|
|
58
73
|
"debug:expire-token": "tsx scripts/expire-token.ts",
|
|
74
|
+
"debug:get-project-token": "tsx scripts/get-project-token.ts",
|
|
59
75
|
"debug:jwks": "tsx scripts/test-jwks-validation.ts",
|
|
60
76
|
"debug:refresh-token": "tsx scripts/refresh-token.ts",
|
|
61
77
|
"debug:tokens": "tsx scripts/debug-tokens.ts",
|
|
62
78
|
"debug:write-token": "tsx scripts/write-token.ts",
|
|
79
|
+
"generate:types": "tsx scripts/generate-types.ts",
|
|
63
80
|
"lint": "eslint .",
|
|
64
81
|
"lint:fix": "eslint . --fix",
|
|
65
82
|
"start": "pnpm build && node ./bin/cli.js",
|