@beezer-pet/instant-cli 0.0.0-stage → 1.0.67-beezer.3
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/.turbo/turbo-build.log +4 -0
- package/LICENSE.md +202 -0
- package/README.md +34 -2
- package/__tests__/appCommands.test.ts +228 -0
- package/__tests__/args.test.ts +358 -0
- package/__tests__/auth.test.ts +128 -0
- package/__tests__/authClientAddApple.test.ts +376 -0
- package/__tests__/authClientAddClerk.test.ts +222 -0
- package/__tests__/authClientAddGithub.test.ts +245 -0
- package/__tests__/authClientAddGoogle.test.ts +373 -0
- package/__tests__/authClientAddLinkedin.test.ts +262 -0
- package/__tests__/authClientList.test.ts +90 -0
- package/__tests__/authClientUpdate.test.ts +583 -0
- package/__tests__/authOriginManagement.test.ts +308 -0
- package/__tests__/backupDownload.test.ts +206 -0
- package/__tests__/backups.test.ts +221 -0
- package/__tests__/config.test.ts +57 -0
- package/__tests__/e2e/cli.e2e.test.ts +1267 -0
- package/__tests__/e2e/helpers.ts +177 -0
- package/__tests__/effectHelpers.ts +45 -0
- package/__tests__/mergeSchema.test.ts +197 -0
- package/__tests__/multiSelect.test.ts +236 -0
- package/__tests__/oauthMock.ts +76 -0
- package/__tests__/promptOk.test.ts +44 -0
- package/__tests__/redirectUriPrompt.test.ts +40 -0
- package/__tests__/sdkInstallSpec.test.ts +36 -0
- package/__tests__/select.test.ts +224 -0
- package/__tests__/webhooks.test.ts +728 -0
- package/bin/index.js +3 -0
- package/dist/auth/index.d.ts +4 -0
- package/dist/auth/index.d.ts.map +1 -0
- package/dist/auth/index.js +103 -0
- package/dist/auth/index.js.map +1 -0
- package/dist/commands/app/delete.d.ts +7 -0
- package/dist/commands/app/delete.d.ts.map +1 -0
- package/dist/commands/app/delete.js +57 -0
- package/dist/commands/app/delete.js.map +1 -0
- package/dist/commands/app/list.d.ts +6 -0
- package/dist/commands/app/list.d.ts.map +1 -0
- package/dist/commands/app/list.js +29 -0
- package/dist/commands/app/list.js.map +1 -0
- package/dist/commands/auth/client/add.d.ts +9 -0
- package/dist/commands/auth/client/add.d.ts.map +1 -0
- package/dist/commands/auth/client/add.js +409 -0
- package/dist/commands/auth/client/add.js.map +1 -0
- package/dist/commands/auth/client/delete.d.ts +11 -0
- package/dist/commands/auth/client/delete.d.ts.map +1 -0
- package/dist/commands/auth/client/delete.js +48 -0
- package/dist/commands/auth/client/delete.js.map +1 -0
- package/dist/commands/auth/client/list.d.ts +6 -0
- package/dist/commands/auth/client/list.d.ts.map +1 -0
- package/dist/commands/auth/client/list.js +38 -0
- package/dist/commands/auth/client/list.js.map +1 -0
- package/dist/commands/auth/client/shared.d.ts +70 -0
- package/dist/commands/auth/client/shared.d.ts.map +1 -0
- package/dist/commands/auth/client/shared.js +140 -0
- package/dist/commands/auth/client/shared.js.map +1 -0
- package/dist/commands/auth/client/update.d.ts +8 -0
- package/dist/commands/auth/client/update.d.ts.map +1 -0
- package/dist/commands/auth/client/update.js +445 -0
- package/dist/commands/auth/client/update.js.map +1 -0
- package/dist/commands/auth/email/pull.d.ts +24 -0
- package/dist/commands/auth/email/pull.d.ts.map +1 -0
- package/dist/commands/auth/email/pull.js +100 -0
- package/dist/commands/auth/email/pull.js.map +1 -0
- package/dist/commands/auth/email/push.d.ts +8 -0
- package/dist/commands/auth/email/push.d.ts.map +1 -0
- package/dist/commands/auth/email/push.js +58 -0
- package/dist/commands/auth/email/push.js.map +1 -0
- package/dist/commands/auth/email/resend.d.ts +3 -0
- package/dist/commands/auth/email/resend.d.ts.map +1 -0
- package/dist/commands/auth/email/resend.js +7 -0
- package/dist/commands/auth/email/resend.js.map +1 -0
- package/dist/commands/auth/email/reset.d.ts +5 -0
- package/dist/commands/auth/email/reset.d.ts.map +1 -0
- package/dist/commands/auth/email/reset.js +25 -0
- package/dist/commands/auth/email/reset.js.map +1 -0
- package/dist/commands/auth/email/status.d.ts +57 -0
- package/dist/commands/auth/email/status.d.ts.map +1 -0
- package/dist/commands/auth/email/status.js +96 -0
- package/dist/commands/auth/email/status.js.map +1 -0
- package/dist/commands/auth/email/verify.d.ts +5 -0
- package/dist/commands/auth/email/verify.d.ts.map +1 -0
- package/dist/commands/auth/email/verify.js +12 -0
- package/dist/commands/auth/email/verify.js.map +1 -0
- package/dist/commands/auth/origin/add.d.ts +12 -0
- package/dist/commands/auth/origin/add.d.ts.map +1 -0
- package/dist/commands/auth/origin/add.js +153 -0
- package/dist/commands/auth/origin/add.js.map +1 -0
- package/dist/commands/auth/origin/delete.d.ts +8 -0
- package/dist/commands/auth/origin/delete.d.ts.map +1 -0
- package/dist/commands/auth/origin/delete.js +38 -0
- package/dist/commands/auth/origin/delete.js.map +1 -0
- package/dist/commands/auth/origin/list.d.ts +9 -0
- package/dist/commands/auth/origin/list.d.ts.map +1 -0
- package/dist/commands/auth/origin/list.js +52 -0
- package/dist/commands/auth/origin/list.js.map +1 -0
- package/dist/commands/backup/download.d.ts +10 -0
- package/dist/commands/backup/download.d.ts.map +1 -0
- package/dist/commands/backup/download.js +174 -0
- package/dist/commands/backup/download.js.map +1 -0
- package/dist/commands/backup/list.d.ts +11 -0
- package/dist/commands/backup/list.d.ts.map +1 -0
- package/dist/commands/backup/list.js +74 -0
- package/dist/commands/backup/list.js.map +1 -0
- package/dist/commands/claim.d.ts +6 -0
- package/dist/commands/claim.d.ts.map +1 -0
- package/dist/commands/claim.js +22 -0
- package/dist/commands/claim.js.map +1 -0
- package/dist/commands/explorer.d.ts +6 -0
- package/dist/commands/explorer.d.ts.map +1 -0
- package/dist/commands/explorer.js +13 -0
- package/dist/commands/explorer.js.map +1 -0
- package/dist/commands/info.d.ts +9 -0
- package/dist/commands/info.d.ts.map +1 -0
- package/dist/commands/info.js +41 -0
- package/dist/commands/info.js.map +1 -0
- package/dist/commands/init.d.ts +5 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +41 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/initWithoutFiles.d.ts +6 -0
- package/dist/commands/initWithoutFiles.d.ts.map +1 -0
- package/dist/commands/initWithoutFiles.js +64 -0
- package/dist/commands/initWithoutFiles.js.map +1 -0
- package/dist/commands/login.d.ts +9 -0
- package/dist/commands/login.d.ts.map +1 -0
- package/dist/commands/login.js +44 -0
- package/dist/commands/login.js.map +1 -0
- package/dist/commands/logout.d.ts +3 -0
- package/dist/commands/logout.d.ts.map +1 -0
- package/dist/commands/logout.js +14 -0
- package/dist/commands/logout.js.map +1 -0
- package/dist/commands/pull.d.ts +5 -0
- package/dist/commands/pull.d.ts.map +1 -0
- package/dist/commands/pull.js +15 -0
- package/dist/commands/pull.js.map +1 -0
- package/dist/commands/push.d.ts +6 -0
- package/dist/commands/push.d.ts.map +1 -0
- package/dist/commands/push.js +20 -0
- package/dist/commands/push.js.map +1 -0
- package/dist/commands/query.d.ts +7 -0
- package/dist/commands/query.d.ts.map +1 -0
- package/dist/commands/query.js +52 -0
- package/dist/commands/query.js.map +1 -0
- package/dist/commands/webhooks/add.d.ts +9 -0
- package/dist/commands/webhooks/add.d.ts.map +1 -0
- package/dist/commands/webhooks/add.js +75 -0
- package/dist/commands/webhooks/add.js.map +1 -0
- package/dist/commands/webhooks/delete.d.ts +6 -0
- package/dist/commands/webhooks/delete.d.ts.map +1 -0
- package/dist/commands/webhooks/delete.js +17 -0
- package/dist/commands/webhooks/delete.js.map +1 -0
- package/dist/commands/webhooks/disable.d.ts +7 -0
- package/dist/commands/webhooks/disable.d.ts.map +1 -0
- package/dist/commands/webhooks/disable.js +18 -0
- package/dist/commands/webhooks/disable.js.map +1 -0
- package/dist/commands/webhooks/enable.d.ts +6 -0
- package/dist/commands/webhooks/enable.d.ts.map +1 -0
- package/dist/commands/webhooks/enable.js +18 -0
- package/dist/commands/webhooks/enable.js.map +1 -0
- package/dist/commands/webhooks/events/list.d.ts +7 -0
- package/dist/commands/webhooks/events/list.d.ts.map +1 -0
- package/dist/commands/webhooks/events/list.js +31 -0
- package/dist/commands/webhooks/events/list.js.map +1 -0
- package/dist/commands/webhooks/events/payload.d.ts +8 -0
- package/dist/commands/webhooks/events/payload.d.ts.map +1 -0
- package/dist/commands/webhooks/events/payload.js +39 -0
- package/dist/commands/webhooks/events/payload.js.map +1 -0
- package/dist/commands/webhooks/events/resend.d.ts +8 -0
- package/dist/commands/webhooks/events/resend.d.ts.map +1 -0
- package/dist/commands/webhooks/events/resend.js +43 -0
- package/dist/commands/webhooks/events/resend.js.map +1 -0
- package/dist/commands/webhooks/list.d.ts +8 -0
- package/dist/commands/webhooks/list.d.ts.map +1 -0
- package/dist/commands/webhooks/list.js +29 -0
- package/dist/commands/webhooks/list.js.map +1 -0
- package/dist/commands/webhooks/shared.d.ts +40 -0
- package/dist/commands/webhooks/shared.d.ts.map +1 -0
- package/dist/commands/webhooks/shared.js +248 -0
- package/dist/commands/webhooks/shared.js.map +1 -0
- package/dist/commands/webhooks/update.d.ts +10 -0
- package/dist/commands/webhooks/update.d.ts.map +1 -0
- package/dist/commands/webhooks/update.js +189 -0
- package/dist/commands/webhooks/update.js.map +1 -0
- package/dist/context/authToken.d.ts +29 -0
- package/dist/context/authToken.d.ts.map +1 -0
- package/dist/context/authToken.js +73 -0
- package/dist/context/authToken.js.map +1 -0
- package/dist/context/currentApp.d.ts +38 -0
- package/dist/context/currentApp.d.ts.map +1 -0
- package/dist/context/currentApp.js +222 -0
- package/dist/context/currentApp.js.map +1 -0
- package/dist/context/globalOpts.d.ts +11 -0
- package/dist/context/globalOpts.d.ts.map +1 -0
- package/dist/context/globalOpts.js +13 -0
- package/dist/context/globalOpts.js.map +1 -0
- package/dist/context/platformApi.d.ts +19 -0
- package/dist/context/platformApi.d.ts.map +1 -0
- package/dist/context/platformApi.js +24 -0
- package/dist/context/platformApi.js.map +1 -0
- package/dist/context/projectInfo.d.ts +30 -0
- package/dist/context/projectInfo.d.ts.map +1 -0
- package/dist/context/projectInfo.js +153 -0
- package/dist/context/projectInfo.js.map +1 -0
- package/dist/errors.d.ts +10 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +6 -0
- package/dist/errors.js.map +1 -0
- package/dist/index.d.ts +159 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +714 -0
- package/dist/index.js.map +1 -0
- package/dist/layer.d.ts +25 -0
- package/dist/layer.d.ts.map +1 -0
- package/dist/layer.js +119 -0
- package/dist/layer.js.map +1 -0
- package/dist/lib/args.d.ts +212 -0
- package/dist/lib/args.d.ts.map +1 -0
- package/dist/lib/args.js +313 -0
- package/dist/lib/args.js.map +1 -0
- package/dist/lib/backupDownload.d.ts +21 -0
- package/dist/lib/backupDownload.d.ts.map +1 -0
- package/dist/lib/backupDownload.js +151 -0
- package/dist/lib/backupDownload.js.map +1 -0
- package/dist/lib/backups.d.ts +12 -0
- package/dist/lib/backups.d.ts.map +1 -0
- package/dist/lib/backups.js +26 -0
- package/dist/lib/backups.js.map +1 -0
- package/dist/lib/config.d.ts +6 -0
- package/dist/lib/config.d.ts.map +1 -0
- package/dist/lib/config.js +39 -0
- package/dist/lib/config.js.map +1 -0
- package/dist/lib/createApp.d.ts +12 -0
- package/dist/lib/createApp.d.ts.map +1 -0
- package/dist/lib/createApp.js +15 -0
- package/dist/lib/createApp.js.map +1 -0
- package/dist/lib/email.d.ts +47 -0
- package/dist/lib/email.d.ts.map +1 -0
- package/dist/lib/email.js +71 -0
- package/dist/lib/email.js.map +1 -0
- package/dist/lib/handleEnv.d.ts +7 -0
- package/dist/lib/handleEnv.d.ts.map +1 -0
- package/dist/lib/handleEnv.js +99 -0
- package/dist/lib/handleEnv.js.map +1 -0
- package/dist/lib/http.d.ts +30 -0
- package/dist/lib/http.d.ts.map +1 -0
- package/dist/lib/http.js +55 -0
- package/dist/lib/http.js.map +1 -0
- package/dist/lib/login.d.ts +12 -0
- package/dist/lib/login.d.ts.map +1 -0
- package/dist/lib/login.js +38 -0
- package/dist/lib/login.js.map +1 -0
- package/dist/lib/oauth.d.ts +306 -0
- package/dist/lib/oauth.d.ts.map +1 -0
- package/dist/lib/oauth.js +195 -0
- package/dist/lib/oauth.js.map +1 -0
- package/dist/lib/platformApi.d.ts +5 -0
- package/dist/lib/platformApi.d.ts.map +1 -0
- package/dist/lib/platformApi.js +11 -0
- package/dist/lib/platformApi.js.map +1 -0
- package/dist/lib/pullPerms.d.ts +7 -0
- package/dist/lib/pullPerms.d.ts.map +1 -0
- package/dist/lib/pullPerms.js +41 -0
- package/dist/lib/pullPerms.js.map +1 -0
- package/dist/lib/pullSchema.d.ts +12 -0
- package/dist/lib/pullSchema.d.ts.map +1 -0
- package/dist/lib/pullSchema.js +62 -0
- package/dist/lib/pullSchema.js.map +1 -0
- package/dist/lib/pushPerms.d.ts +13 -0
- package/dist/lib/pushPerms.d.ts.map +1 -0
- package/dist/lib/pushPerms.js +54 -0
- package/dist/lib/pushPerms.js.map +1 -0
- package/dist/lib/pushSchema.d.ts +53 -0
- package/dist/lib/pushSchema.d.ts.map +1 -0
- package/dist/lib/pushSchema.js +165 -0
- package/dist/lib/pushSchema.js.map +1 -0
- package/dist/lib/ui.d.ts +18 -0
- package/dist/lib/ui.d.ts.map +1 -0
- package/dist/lib/ui.js +32 -0
- package/dist/lib/ui.js.map +1 -0
- package/dist/lib/webhooks.d.ts +27 -0
- package/dist/lib/webhooks.d.ts.map +1 -0
- package/dist/lib/webhooks.js +95 -0
- package/dist/lib/webhooks.js.map +1 -0
- package/dist/logging.d.ts +5 -0
- package/dist/logging.d.ts.map +1 -0
- package/dist/logging.js +25 -0
- package/dist/logging.js.map +1 -0
- package/dist/old.d.ts +17 -0
- package/dist/old.d.ts.map +1 -0
- package/dist/old.js +410 -0
- package/dist/old.js.map +1 -0
- package/dist/program.d.ts +3 -0
- package/dist/program.d.ts.map +1 -0
- package/dist/program.js +3 -0
- package/dist/program.js.map +1 -0
- package/dist/renderSchemaPlan.d.ts +19 -0
- package/dist/renderSchemaPlan.d.ts.map +1 -0
- package/dist/renderSchemaPlan.js +220 -0
- package/dist/renderSchemaPlan.js.map +1 -0
- package/dist/ui/index.d.ts +292 -0
- package/dist/ui/index.d.ts.map +1 -0
- package/dist/ui/index.js +1296 -0
- package/dist/ui/index.js.map +1 -0
- package/dist/ui/lib.d.ts +124 -0
- package/dist/ui/lib.d.ts.map +1 -0
- package/dist/ui/lib.js +333 -0
- package/dist/ui/lib.js.map +1 -0
- package/dist/util/findConfigCandidates.d.ts +13 -0
- package/dist/util/findConfigCandidates.d.ts.map +1 -0
- package/dist/util/findConfigCandidates.js +211 -0
- package/dist/util/findConfigCandidates.js.map +1 -0
- package/dist/util/fs.d.ts +4 -0
- package/dist/util/fs.d.ts.map +1 -0
- package/dist/util/fs.js +22 -0
- package/dist/util/fs.js.map +1 -0
- package/dist/util/getAppName.d.ts +5 -0
- package/dist/util/getAppName.d.ts.map +1 -0
- package/dist/util/getAppName.js +14 -0
- package/dist/util/getAppName.js.map +1 -0
- package/dist/util/instantConfig.d.ts +9 -0
- package/dist/util/instantConfig.d.ts.map +1 -0
- package/dist/util/instantConfig.js +13 -0
- package/dist/util/instantConfig.js.map +1 -0
- package/dist/util/isHeadlessEnvironment.d.ts +4 -0
- package/dist/util/isHeadlessEnvironment.d.ts.map +1 -0
- package/dist/util/isHeadlessEnvironment.js +11 -0
- package/dist/util/isHeadlessEnvironment.js.map +1 -0
- package/dist/util/loadConfig.d.ts +3 -0
- package/dist/util/loadConfig.d.ts.map +1 -0
- package/dist/util/loadConfig.js +72 -0
- package/dist/util/loadConfig.js.map +1 -0
- package/dist/util/loadEnv.d.ts +2 -0
- package/dist/util/loadEnv.d.ts.map +1 -0
- package/dist/util/loadEnv.js +10 -0
- package/dist/util/loadEnv.js.map +1 -0
- package/dist/util/mergeSchema.d.ts +10 -0
- package/dist/util/mergeSchema.d.ts.map +1 -0
- package/dist/util/mergeSchema.js +338 -0
- package/dist/util/mergeSchema.js.map +1 -0
- package/dist/util/projectDir.d.ts +7 -0
- package/dist/util/projectDir.d.ts.map +1 -0
- package/dist/util/projectDir.js +43 -0
- package/dist/util/projectDir.js.map +1 -0
- package/dist/util/renamePrompt.d.ts +15 -0
- package/dist/util/renamePrompt.d.ts.map +1 -0
- package/dist/util/renamePrompt.js +57 -0
- package/dist/util/renamePrompt.js.map +1 -0
- package/dist/util/sdkInstallSpec.d.ts +13 -0
- package/dist/util/sdkInstallSpec.d.ts.map +1 -0
- package/dist/util/sdkInstallSpec.js +37 -0
- package/dist/util/sdkInstallSpec.js.map +1 -0
- package/dist/version.d.ts +3 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +3 -0
- package/dist/version.js.map +1 -0
- package/package.json +91 -3
- package/src/auth/index.ts +125 -0
- package/src/commands/app/delete.ts +82 -0
- package/src/commands/app/list.ts +44 -0
- package/src/commands/auth/client/add.ts +744 -0
- package/src/commands/auth/client/delete.ts +60 -0
- package/src/commands/auth/client/list.ts +60 -0
- package/src/commands/auth/client/shared.ts +190 -0
- package/src/commands/auth/client/update.ts +830 -0
- package/src/commands/auth/email/pull.ts +143 -0
- package/src/commands/auth/email/push.ts +94 -0
- package/src/commands/auth/email/resend.ts +8 -0
- package/src/commands/auth/email/reset.ts +37 -0
- package/src/commands/auth/email/status.ts +154 -0
- package/src/commands/auth/email/verify.ts +20 -0
- package/src/commands/auth/origin/add.ts +237 -0
- package/src/commands/auth/origin/delete.ts +50 -0
- package/src/commands/auth/origin/list.ts +66 -0
- package/src/commands/backup/download.ts +231 -0
- package/src/commands/backup/list.ts +94 -0
- package/src/commands/claim.ts +31 -0
- package/src/commands/explorer.ts +21 -0
- package/src/commands/info.ts +57 -0
- package/src/commands/init.ts +60 -0
- package/src/commands/initWithoutFiles.ts +107 -0
- package/src/commands/login.ts +62 -0
- package/src/commands/logout.ts +22 -0
- package/src/commands/pull.ts +22 -0
- package/src/commands/push.ts +25 -0
- package/src/commands/query.ts +61 -0
- package/src/commands/webhooks/add.ts +111 -0
- package/src/commands/webhooks/delete.ts +23 -0
- package/src/commands/webhooks/disable.ts +24 -0
- package/src/commands/webhooks/enable.ts +24 -0
- package/src/commands/webhooks/events/list.ts +38 -0
- package/src/commands/webhooks/events/payload.ts +56 -0
- package/src/commands/webhooks/events/resend.ts +66 -0
- package/src/commands/webhooks/list.ts +41 -0
- package/src/commands/webhooks/shared.ts +339 -0
- package/src/commands/webhooks/update.ts +276 -0
- package/src/context/authToken.ts +134 -0
- package/src/context/currentApp.ts +301 -0
- package/src/context/globalOpts.ts +22 -0
- package/src/context/platformApi.ts +35 -0
- package/src/context/projectInfo.ts +219 -0
- package/src/errors.ts +7 -0
- package/src/index.ts +1212 -0
- package/src/layer.ts +211 -0
- package/src/lib/args.ts +453 -0
- package/src/lib/backupDownload.ts +188 -0
- package/src/lib/backups.ts +33 -0
- package/src/lib/config.ts +73 -0
- package/src/lib/createApp.ts +28 -0
- package/src/lib/email.ts +93 -0
- package/src/lib/handleEnv.ts +122 -0
- package/src/lib/http.ts +128 -0
- package/src/lib/login.ts +48 -0
- package/src/lib/oauth.ts +310 -0
- package/src/lib/platformApi.ts +11 -0
- package/src/lib/pullPerms.ts +50 -0
- package/src/lib/pullSchema.ts +95 -0
- package/src/lib/pushPerms.ts +80 -0
- package/src/lib/pushSchema.ts +248 -0
- package/src/lib/ui.ts +48 -0
- package/src/lib/webhooks.ts +118 -0
- package/src/logging.ts +41 -0
- package/src/old.js +487 -0
- package/src/program.ts +3 -0
- package/src/renderSchemaPlan.ts +324 -0
- package/src/ui/index.ts +1615 -0
- package/src/ui/lib.ts +424 -0
- package/src/util/findConfigCandidates.ts +262 -0
- package/src/util/fs.ts +26 -0
- package/src/util/getAppName.ts +14 -0
- package/src/util/instantConfig.ts +21 -0
- package/src/util/isHeadlessEnvironment.ts +15 -0
- package/src/util/loadConfig.ts +93 -0
- package/src/util/loadEnv.ts +11 -0
- package/src/util/mergeSchema.ts +374 -0
- package/src/util/projectDir.ts +54 -0
- package/src/util/renamePrompt.ts +79 -0
- package/src/util/sdkInstallSpec.ts +45 -0
- package/src/version.js +3 -0
- package/tsconfig.build.json +20 -0
- package/tsconfig.json +23 -0
- package/vitest.config.ts +22 -0
package/src/old.js
ADDED
|
@@ -0,0 +1,487 @@
|
|
|
1
|
+
import boxen from 'boxen';
|
|
2
|
+
import chalk from 'chalk';
|
|
3
|
+
import { program } from '@commander-js/extra-typings';
|
|
4
|
+
import path from 'node:path';
|
|
5
|
+
import { readAuthToken } from './auth/index.ts';
|
|
6
|
+
import { UI } from './ui/index.ts';
|
|
7
|
+
import { deferred, renderUnwrap } from './ui/lib.ts';
|
|
8
|
+
import {
|
|
9
|
+
getEmailReadCandidates,
|
|
10
|
+
getPermsReadCandidates,
|
|
11
|
+
getSchemaReadCandidates,
|
|
12
|
+
} from './util/findConfigCandidates.ts';
|
|
13
|
+
import { loadConfig } from './util/loadConfig.ts';
|
|
14
|
+
import { ResolveRenamePrompt } from './util/renamePrompt.ts';
|
|
15
|
+
import version from './version.js';
|
|
16
|
+
import { link } from './logging.ts';
|
|
17
|
+
|
|
18
|
+
const dev = Boolean(process.env.INSTANT_CLI_DEV);
|
|
19
|
+
const verbose = Boolean(process.env.INSTANT_CLI_VERBOSE);
|
|
20
|
+
|
|
21
|
+
function error(firstArg, ...rest) {
|
|
22
|
+
console.error(chalk.red('[error]') + ' ' + firstArg, ...rest);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
const potentialAdminTokenEnvs = {
|
|
26
|
+
default: 'INSTANT_APP_ADMIN_TOKEN',
|
|
27
|
+
short: 'INSTANT_ADMIN_TOKEN',
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
const instantDashOrigin = dev
|
|
31
|
+
? 'http://localhost:3000'
|
|
32
|
+
: 'https://instantdb.com';
|
|
33
|
+
|
|
34
|
+
function indexingJobCompletedActionMessage(job) {
|
|
35
|
+
if (job.job_type === 'check-data-type') {
|
|
36
|
+
return `setting type of ${job.attr_name} to ${job.checked_data_type}`;
|
|
37
|
+
}
|
|
38
|
+
if (job.job_type === 'remove-data-type') {
|
|
39
|
+
return `removing type from ${job.attr_name}`;
|
|
40
|
+
}
|
|
41
|
+
if (job.job_type === 'index') {
|
|
42
|
+
return `adding index to ${job.attr_name}`;
|
|
43
|
+
}
|
|
44
|
+
if (job.job_type === 'remove-index') {
|
|
45
|
+
return `removing index from ${job.attr_name}`;
|
|
46
|
+
}
|
|
47
|
+
if (job.job_type === 'unique') {
|
|
48
|
+
return `adding uniqueness constraint to ${job.attr_name}`;
|
|
49
|
+
}
|
|
50
|
+
if (job.job_type === 'remove-unique') {
|
|
51
|
+
return `removing uniqueness constraint from ${job.attr_name}`;
|
|
52
|
+
}
|
|
53
|
+
if (job.job_type === 'required') {
|
|
54
|
+
return `adding required constraint to ${job.attr_name}`;
|
|
55
|
+
}
|
|
56
|
+
if (job.job_type === 'remove-required') {
|
|
57
|
+
return `removing required constraint from ${job.attr_name}`;
|
|
58
|
+
}
|
|
59
|
+
return `unexpected job type ${job.job_type} - please ping us on discord with this job id (${job.id})`;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
function truncate(s, maxLen) {
|
|
63
|
+
if (s.length > maxLen) {
|
|
64
|
+
return `${s.substr(0, maxLen - 3)}...`;
|
|
65
|
+
}
|
|
66
|
+
return s;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
function formatSamples(triples_samples) {
|
|
70
|
+
return triples_samples.slice(0, 3).map((t) => {
|
|
71
|
+
return { ...t, value: truncate(JSON.stringify(t.value), 32) };
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
function createUrl(triple, job) {
|
|
76
|
+
const urlParams = new URLSearchParams({
|
|
77
|
+
s: 'main',
|
|
78
|
+
app: job.app_id,
|
|
79
|
+
t: 'explorer',
|
|
80
|
+
ns: job.attr_name.split('.')[0],
|
|
81
|
+
where: JSON.stringify(['id', triple.entity_id]),
|
|
82
|
+
});
|
|
83
|
+
const url = new URL(instantDashOrigin);
|
|
84
|
+
url.pathname = '/dash';
|
|
85
|
+
url.search = urlParams.toString();
|
|
86
|
+
return url;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
function padCell(value, width) {
|
|
90
|
+
const trimmed = value.length > width ? value.substring(0, width) : value;
|
|
91
|
+
return trimmed + ' '.repeat(width - trimmed.length);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
function indexingJobCompletedMessage(job) {
|
|
95
|
+
const actionMessage = indexingJobCompletedActionMessage(job);
|
|
96
|
+
if (job.job_status === 'canceled') {
|
|
97
|
+
return `Canceled ${actionMessage} before it could finish.`;
|
|
98
|
+
}
|
|
99
|
+
if (job.job_status === 'completed') {
|
|
100
|
+
return `Finished ${actionMessage}.`;
|
|
101
|
+
}
|
|
102
|
+
if (job.job_status === 'errored') {
|
|
103
|
+
if (job.invalid_triples_sample?.length) {
|
|
104
|
+
const [etype, label] = job.attr_name.split('.');
|
|
105
|
+
const samples = formatSamples(job.invalid_triples_sample);
|
|
106
|
+
const longestValue = samples.reduce(
|
|
107
|
+
(acc, { value }) => Math.max(acc, value.length),
|
|
108
|
+
label.length,
|
|
109
|
+
);
|
|
110
|
+
|
|
111
|
+
const columns = [
|
|
112
|
+
{ header: 'namespace', width: 15, getValue: () => etype },
|
|
113
|
+
{
|
|
114
|
+
header: 'id',
|
|
115
|
+
width: 37,
|
|
116
|
+
getValue: (triple) =>
|
|
117
|
+
link(createUrl(triple, job).toString(), triple.entity_id),
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
header: label,
|
|
121
|
+
width: longestValue + 2,
|
|
122
|
+
getValue: (triple) => triple.value,
|
|
123
|
+
},
|
|
124
|
+
{ header: 'type', width: 8, getValue: (triple) => triple.json_type },
|
|
125
|
+
];
|
|
126
|
+
|
|
127
|
+
let msg = `${chalk.red('INVALID DATA')} ${actionMessage}.\n`;
|
|
128
|
+
if (job.invalid_unique_value) {
|
|
129
|
+
msg += ` Found multiple entities with value ${truncate(JSON.stringify(job.invalid_unique_value), 64)}.\n`;
|
|
130
|
+
}
|
|
131
|
+
if (job.error === 'triple-too-large-error') {
|
|
132
|
+
msg += ` Some of the existing data is too large to index.\n`;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
msg += ` First few examples:\n`;
|
|
136
|
+
msg += ` ${columns.map((col) => chalk.bold(padCell(col.header, col.width))).join(' | ')}\n`;
|
|
137
|
+
msg += ` ${columns.map((col) => '-'.repeat(col.width)).join('-|-')}\n`;
|
|
138
|
+
|
|
139
|
+
for (const triple of samples) {
|
|
140
|
+
const cells = columns.map((col) =>
|
|
141
|
+
padCell(col.getValue(triple), col.width),
|
|
142
|
+
);
|
|
143
|
+
msg += ` ${cells.join(' | ')}\n`;
|
|
144
|
+
}
|
|
145
|
+
return msg;
|
|
146
|
+
}
|
|
147
|
+
return `Error ${actionMessage}.`;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
function joinInSentence(items) {
|
|
152
|
+
if (items.length === 0) {
|
|
153
|
+
return '';
|
|
154
|
+
}
|
|
155
|
+
if (items.length === 1) {
|
|
156
|
+
return items[0];
|
|
157
|
+
}
|
|
158
|
+
if (items.length === 2) {
|
|
159
|
+
return `${items[0]} and ${items[1]}`;
|
|
160
|
+
}
|
|
161
|
+
return `${items.slice(0, -1).join(', ')}, and ${items[items.length - 1]}`;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
function jobGroupDescription(jobs) {
|
|
165
|
+
const actions = new Set();
|
|
166
|
+
const jobActions = {
|
|
167
|
+
'check-data-type': 'updating types',
|
|
168
|
+
'remove-data-type': 'updating types',
|
|
169
|
+
index: 'updating indexes',
|
|
170
|
+
'remove-index': 'updating indexes',
|
|
171
|
+
unique: 'updating uniqueness constraints',
|
|
172
|
+
'remove-unique': 'updating uniqueness constraints',
|
|
173
|
+
required: 'making attributes required',
|
|
174
|
+
'remove-required': 'making attributes optional',
|
|
175
|
+
};
|
|
176
|
+
for (const job of jobs) {
|
|
177
|
+
actions.add(jobActions[job.job_type]);
|
|
178
|
+
}
|
|
179
|
+
return joinInSentence([...actions].sort()) || 'updating schema';
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
// TODO: rewrite in effect
|
|
183
|
+
export async function waitForIndexingJobsToFinish(
|
|
184
|
+
appId,
|
|
185
|
+
data,
|
|
186
|
+
authToken,
|
|
187
|
+
apiURI,
|
|
188
|
+
) {
|
|
189
|
+
const spinnerDefferedPromise = deferred();
|
|
190
|
+
const spinner = new UI.Spinner({
|
|
191
|
+
promise: spinnerDefferedPromise.promise,
|
|
192
|
+
});
|
|
193
|
+
const spinnerRenderPromise = renderUnwrap(spinner);
|
|
194
|
+
|
|
195
|
+
const groupId = data['group-id'];
|
|
196
|
+
let jobs = data.jobs;
|
|
197
|
+
let waitMs = 20;
|
|
198
|
+
let lastUpdatedAt = new Date(0);
|
|
199
|
+
|
|
200
|
+
const completedIds = new Set();
|
|
201
|
+
|
|
202
|
+
const errorMessages = [];
|
|
203
|
+
|
|
204
|
+
while (true) {
|
|
205
|
+
let stillRunning = false;
|
|
206
|
+
let updated = false;
|
|
207
|
+
let workEstimateTotal = 0;
|
|
208
|
+
let workCompletedTotal = 0;
|
|
209
|
+
|
|
210
|
+
for (const job of jobs) {
|
|
211
|
+
const updatedAt = new Date(job.updated_at);
|
|
212
|
+
if (updatedAt > lastUpdatedAt) {
|
|
213
|
+
updated = true;
|
|
214
|
+
lastUpdatedAt = updatedAt;
|
|
215
|
+
}
|
|
216
|
+
if (job.job_status === 'waiting' || job.job_status === 'processing') {
|
|
217
|
+
stillRunning = true;
|
|
218
|
+
// Default estimate to high value to prevent % from jumping around
|
|
219
|
+
workEstimateTotal += job.work_estimate ?? 50000;
|
|
220
|
+
workCompletedTotal += job.work_completed ?? 0;
|
|
221
|
+
} else {
|
|
222
|
+
if (!completedIds.has(job.id)) {
|
|
223
|
+
completedIds.add(job.id);
|
|
224
|
+
const msg = indexingJobCompletedMessage(job);
|
|
225
|
+
if (msg) {
|
|
226
|
+
if (job.job_status === 'errored') {
|
|
227
|
+
spinner.addMessage(msg);
|
|
228
|
+
errorMessages.push(msg);
|
|
229
|
+
} else {
|
|
230
|
+
spinner.addMessage(msg);
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
if (!stillRunning) {
|
|
237
|
+
break;
|
|
238
|
+
}
|
|
239
|
+
if (workEstimateTotal) {
|
|
240
|
+
const percent = Math.floor(
|
|
241
|
+
(workCompletedTotal / workEstimateTotal) * 100,
|
|
242
|
+
);
|
|
243
|
+
spinner.updateText(`${jobGroupDescription(jobs)} ${percent}%`);
|
|
244
|
+
}
|
|
245
|
+
waitMs = updated ? 1 : Math.min(10000, waitMs * 2);
|
|
246
|
+
await sleep(waitMs);
|
|
247
|
+
const res = await fetchJson({
|
|
248
|
+
debugName: 'Check indexing status',
|
|
249
|
+
method: 'GET',
|
|
250
|
+
authToken,
|
|
251
|
+
apiURI,
|
|
252
|
+
path: `/dash/apps/${appId}/indexing-jobs/group/${groupId}`,
|
|
253
|
+
errorMessage: 'Failed to check indexing status.',
|
|
254
|
+
command: 'push',
|
|
255
|
+
});
|
|
256
|
+
if (!res.ok) {
|
|
257
|
+
break;
|
|
258
|
+
}
|
|
259
|
+
jobs = res.data.jobs;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
spinnerDefferedPromise.resolve(null);
|
|
263
|
+
|
|
264
|
+
await spinnerRenderPromise;
|
|
265
|
+
|
|
266
|
+
// Log errors at the end so that they're easier to see.
|
|
267
|
+
if (errorMessages.length) {
|
|
268
|
+
for (const msg of errorMessages) {
|
|
269
|
+
console.log(msg);
|
|
270
|
+
}
|
|
271
|
+
console.log(chalk.red('Some steps failed while updating schema.'));
|
|
272
|
+
process.exit(1);
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
export const resolveRenames = async (created, promptData, extraInfo) => {
|
|
277
|
+
const answer = await renderUnwrap(
|
|
278
|
+
new ResolveRenamePrompt(
|
|
279
|
+
created,
|
|
280
|
+
promptData,
|
|
281
|
+
extraInfo,
|
|
282
|
+
UI.modifiers.piped([
|
|
283
|
+
(out) =>
|
|
284
|
+
boxen(out, {
|
|
285
|
+
dimBorder: true,
|
|
286
|
+
padding: {
|
|
287
|
+
left: 1,
|
|
288
|
+
right: 1,
|
|
289
|
+
},
|
|
290
|
+
}),
|
|
291
|
+
UI.modifiers.vanishOnComplete,
|
|
292
|
+
]),
|
|
293
|
+
),
|
|
294
|
+
);
|
|
295
|
+
return answer;
|
|
296
|
+
};
|
|
297
|
+
|
|
298
|
+
/**
|
|
299
|
+
* Fetches JSON data from a specified path using the POST method.
|
|
300
|
+
*
|
|
301
|
+
* @param {Object} options
|
|
302
|
+
* @param {string} options.debugName
|
|
303
|
+
* @param {string} options.errorMessage
|
|
304
|
+
* @param {string} options.path
|
|
305
|
+
* @param {'POST' | 'GET'} [options.method]
|
|
306
|
+
* @param {Object} [options.body=undefined]
|
|
307
|
+
* @param {boolean} [options.noAuth]
|
|
308
|
+
* @param {boolean} [options.noLogError]
|
|
309
|
+
* @param {string} [options.command] - The CLI command being executed (e.g., 'push', 'pull', 'login')
|
|
310
|
+
* @param {string} [options.authToken] - Optional auth token to use instead of reading from config
|
|
311
|
+
* @param {string} options.apiURI - Backend API origin
|
|
312
|
+
* @param {Record<string, string>} [options.headers] - Extra headers to include in the request
|
|
313
|
+
* @returns {Promise<{ ok: boolean; data: any }>}
|
|
314
|
+
*/
|
|
315
|
+
async function fetchJson({
|
|
316
|
+
debugName,
|
|
317
|
+
errorMessage,
|
|
318
|
+
path,
|
|
319
|
+
body,
|
|
320
|
+
method,
|
|
321
|
+
noAuth,
|
|
322
|
+
noLogError,
|
|
323
|
+
command,
|
|
324
|
+
authToken: providedAuthToken,
|
|
325
|
+
apiURI,
|
|
326
|
+
headers: extraHeaders,
|
|
327
|
+
}) {
|
|
328
|
+
const withAuth = !noAuth;
|
|
329
|
+
const withErrorLogging = !noLogError;
|
|
330
|
+
let authToken = null;
|
|
331
|
+
if (withAuth) {
|
|
332
|
+
authToken =
|
|
333
|
+
providedAuthToken ?? (await readConfigAuthTokenWithErrorLogging(apiURI));
|
|
334
|
+
if (!authToken) {
|
|
335
|
+
return { ok: false, data: undefined };
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
const timeoutMs = 1000 * 60 * 5; // 5 minutes
|
|
339
|
+
|
|
340
|
+
try {
|
|
341
|
+
const res = await fetch(`${apiURI}${path}`, {
|
|
342
|
+
method: method ?? 'GET',
|
|
343
|
+
headers: {
|
|
344
|
+
...(withAuth ? { Authorization: `Bearer ${authToken}` } : {}),
|
|
345
|
+
'Content-Type': 'application/json',
|
|
346
|
+
'X-Instant-Source': 'instant-cli',
|
|
347
|
+
'X-Instant-Version': version,
|
|
348
|
+
...(command ? { 'X-Instant-Command': command } : {}),
|
|
349
|
+
...extraHeaders,
|
|
350
|
+
},
|
|
351
|
+
body: body ? JSON.stringify(body) : undefined,
|
|
352
|
+
signal: AbortSignal.timeout(timeoutMs),
|
|
353
|
+
});
|
|
354
|
+
|
|
355
|
+
if (verbose) {
|
|
356
|
+
console.log(debugName, 'response:', res.status, res.statusText);
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
let data;
|
|
360
|
+
try {
|
|
361
|
+
data = await res.json();
|
|
362
|
+
} catch {
|
|
363
|
+
data = null;
|
|
364
|
+
}
|
|
365
|
+
if (verbose && data) {
|
|
366
|
+
console.log(debugName, 'json:', JSON.stringify(data, null, 2));
|
|
367
|
+
}
|
|
368
|
+
if (!res.ok) {
|
|
369
|
+
if (withErrorLogging) {
|
|
370
|
+
error(errorMessage);
|
|
371
|
+
prettyPrintJSONErr(data);
|
|
372
|
+
}
|
|
373
|
+
return { ok: false, data };
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
return { ok: true, data };
|
|
377
|
+
} catch (err) {
|
|
378
|
+
if (withErrorLogging) {
|
|
379
|
+
if (err.name === 'AbortError') {
|
|
380
|
+
error(
|
|
381
|
+
`Timeout: It took more than ${timeoutMs / 60000} minutes to get the result.`,
|
|
382
|
+
);
|
|
383
|
+
} else {
|
|
384
|
+
error(`Error: type: ${err.name}, message: ${err.message}`);
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
return { ok: false, data: null };
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
function prettyPrintJSONErr(data) {
|
|
392
|
+
if (data?.message) {
|
|
393
|
+
error(data.message);
|
|
394
|
+
}
|
|
395
|
+
if (Array.isArray(data?.hint?.errors)) {
|
|
396
|
+
for (const err of data.hint.errors) {
|
|
397
|
+
error(`${err.in ? err.in.join('->') + ': ' : ''}${err.message}`);
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
if (!data) {
|
|
401
|
+
error('Failed to parse error response');
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
export async function readLocalPermsFile() {
|
|
406
|
+
const readCandidates = getPermsReadCandidates();
|
|
407
|
+
const res = await loadConfig({
|
|
408
|
+
sources: readCandidates,
|
|
409
|
+
merge: false,
|
|
410
|
+
});
|
|
411
|
+
if (!res.config) return;
|
|
412
|
+
const relativePath = path.relative(process.cwd(), res.sources[0]);
|
|
413
|
+
return { path: relativePath, perms: res.config };
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
export async function readLocalSchemaFile() {
|
|
417
|
+
const readCandidates = getSchemaReadCandidates();
|
|
418
|
+
const res = await loadConfig({
|
|
419
|
+
sources: readCandidates,
|
|
420
|
+
merge: false,
|
|
421
|
+
});
|
|
422
|
+
if (!res.config) return;
|
|
423
|
+
const relativePath = path.relative(process.cwd(), res.sources[0]);
|
|
424
|
+
return { path: relativePath, schema: res.config };
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
export async function readLocalEmailFile(emailPath) {
|
|
428
|
+
const readCandidates = getEmailReadCandidates(emailPath);
|
|
429
|
+
const res = await loadConfig({
|
|
430
|
+
sources: readCandidates,
|
|
431
|
+
merge: false,
|
|
432
|
+
});
|
|
433
|
+
if (!res.config) return;
|
|
434
|
+
const relativePath = path.relative(process.cwd(), res.sources[0]);
|
|
435
|
+
return { path: relativePath, email: res.config };
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
async function readConfigAuthToken(apiURI, allowAdminToken = true) {
|
|
439
|
+
const options = program.opts();
|
|
440
|
+
// @ts-expect-error command opts type is unknown
|
|
441
|
+
if (typeof options.token === 'string') {
|
|
442
|
+
// @ts-expect-error command opts type is unknown
|
|
443
|
+
return options.token;
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
if (process.env.INSTANT_CLI_AUTH_TOKEN) {
|
|
447
|
+
return process.env.INSTANT_CLI_AUTH_TOKEN;
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
if (allowAdminToken) {
|
|
451
|
+
const adminTokenNames = Object.values(potentialAdminTokenEnvs);
|
|
452
|
+
for (const envName of adminTokenNames) {
|
|
453
|
+
const token = process.env[envName];
|
|
454
|
+
if (token) {
|
|
455
|
+
return token;
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
const authToken = await readAuthToken(apiURI).catch(() => null);
|
|
461
|
+
|
|
462
|
+
if (authToken) {
|
|
463
|
+
return authToken;
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
return null;
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
export async function readConfigAuthTokenWithErrorLogging(apiURI) {
|
|
470
|
+
const token = await readConfigAuthToken(apiURI);
|
|
471
|
+
if (!token) {
|
|
472
|
+
error(
|
|
473
|
+
`Looks like you are not logged in. Please log in with ${chalk.green('`instant-cli login`')}`,
|
|
474
|
+
);
|
|
475
|
+
}
|
|
476
|
+
return token;
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
// utils
|
|
480
|
+
|
|
481
|
+
function sleep(ms) {
|
|
482
|
+
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
export function countEntities(o) {
|
|
486
|
+
return Object.keys(o).length;
|
|
487
|
+
}
|
package/src/program.ts
ADDED