@cedarjs/cli 9.0.0-canary.1784 → 9.0.0-canary.3124
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/README.md +7 -10
- package/dist/cfw.js +10 -6
- package/dist/commands/build/buildHandler.js +220 -45
- package/dist/commands/build/buildPackagesTask.js +21 -20
- package/dist/commands/build.js +13 -2
- package/dist/commands/check.js +4 -6
- package/dist/commands/console.js +6 -4
- package/dist/commands/deploy/baremetal/SshExecutor.js +13 -4
- package/dist/commands/deploy/baremetal/baremetalHandler.js +116 -50
- package/dist/commands/deploy/baremetal.js +11 -4
- package/dist/commands/deploy/flightcontrolHandler.js +28 -15
- package/dist/commands/deploy/helpers/deployHandler.js +11 -6
- package/dist/commands/deploy/netlify.js +1 -1
- package/dist/commands/deploy/packing/nft.js +1 -2
- package/dist/commands/deploy/render.js +1 -1
- package/dist/commands/deploy/renderHandler.js +24 -13
- package/dist/commands/deploy/serverlessHandler.js +69 -27
- package/dist/commands/deploy/vercel.js +1 -1
- package/dist/commands/destroy/component/component.js +2 -3
- package/dist/commands/destroy/directive/directive.js +1 -3
- package/dist/commands/destroy/directive/directiveHandler.js +2 -4
- package/dist/commands/destroy/function/function.js +1 -3
- package/dist/commands/destroy/handlerHelpers.js +17 -17
- package/dist/commands/destroy/helpers.js +8 -2
- package/dist/commands/destroy/layout/layout.js +1 -2
- package/dist/commands/destroy/page/pageHandler.js +3 -3
- package/dist/commands/destroy/scaffold/scaffoldHandler.js +31 -12
- package/dist/commands/destroy/sdl/sdlHandler.js +3 -3
- package/dist/commands/dev/apiDebugFlag.js +5 -4
- package/dist/commands/dev/devHandler.js +219 -68
- package/dist/commands/dev/packageWatchCommands.js +8 -3
- package/dist/commands/dev.js +16 -6
- package/dist/commands/execHandler.js +49 -29
- package/dist/commands/experimental/live-queries/liveQueries.js +32 -0
- package/dist/commands/experimental/live-queries/liveQueriesHandler.js +448 -0
- package/dist/commands/experimental/live-queries/templates/liveQueriesListener.ts.template +153 -0
- package/dist/commands/experimental/live-queries/templates/migration.sql.template +100 -0
- package/dist/commands/experimental/setupInngest.js +2 -2
- package/dist/commands/experimental/setupInngestHandler.js +13 -12
- package/dist/commands/experimental/setupOpentelemetry.js +2 -2
- package/dist/commands/experimental/setupOpentelemetryHandler.js +14 -10
- package/dist/commands/experimental/setupReactCompiler.js +2 -2
- package/dist/commands/experimental/setupReactCompilerHandler.js +48 -33
- package/dist/commands/experimental/setupRsc.js +1 -1
- package/dist/commands/experimental/setupRscHandler.js +20 -16
- package/dist/commands/experimental/setupStreamingSsr.js +2 -2
- package/dist/commands/experimental/setupStreamingSsrHandler.js +49 -34
- package/dist/commands/experimental/templates/opentelemetry.ts.template +2 -1
- package/dist/commands/experimental/templates/rsc/Document.tsx.template +1 -1
- package/dist/commands/experimental/templates/rsc/entry.client.tsx.template +8 -8
- package/dist/commands/experimental/templates/streamingSsr/Document.tsx.template +1 -1
- package/dist/commands/experimental/templates/streamingSsr/entry.client.tsx.template +6 -6
- package/dist/commands/experimental/templates/streamingSsr/tsconfig.json.template +6 -6
- package/dist/commands/experimental/util.js +27 -25
- package/dist/commands/experimental.js +3 -2
- package/dist/commands/generate/cell/cell.js +20 -0
- package/dist/commands/generate/cell/cellHandler.js +89 -40
- package/dist/commands/generate/cell/templates/cell.tsx.template +21 -2
- package/dist/commands/generate/cell/templates/cellFragment.tsx.template +43 -0
- package/dist/commands/generate/cell/templates/cellList.tsx.template +21 -2
- package/dist/commands/generate/cell/templates/storiesFragment.tsx.template +23 -0
- package/dist/commands/generate/cell/templates/test.js.template +1 -1
- package/dist/commands/generate/cell/templates/testFragment.js.template +30 -0
- package/dist/commands/generate/component/componentHandler.js +14 -16
- package/dist/commands/generate/dataMigration/dataMigration.js +36 -18
- package/dist/commands/generate/dataMigration/templates/dataMigration.js.template +1 -1
- package/dist/commands/generate/dataMigration/templates/dataMigration.ts.template +1 -1
- package/dist/commands/generate/dbAuth/dbAuth.js +1 -0
- package/dist/commands/generate/dbAuth/dbAuthHandler.js +63 -34
- package/dist/commands/generate/dbAuth/templates/login.oauth.tsx.template +164 -0
- package/dist/commands/generate/dbAuth/templates/signup.oauth.tsx.template +147 -0
- package/dist/commands/generate/directive/directiveHandler.js +14 -16
- package/dist/commands/generate/function/function.js +1 -0
- package/dist/commands/generate/function/functionHandler.js +14 -19
- package/dist/commands/generate/helpers.js +34 -18
- package/dist/commands/generate/job/job.js +1 -0
- package/dist/commands/generate/job/jobHandler.js +20 -24
- package/dist/commands/generate/layout/layoutHandler.js +13 -16
- package/dist/commands/generate/model/model.js +1 -0
- package/dist/commands/generate/model/modelHandler.js +11 -5
- package/dist/commands/generate/ogImage/ogImage.js +1 -0
- package/dist/commands/generate/ogImage/ogImageHandler.js +18 -11
- package/dist/commands/generate/package/filesTask.js +9 -0
- package/dist/commands/generate/package/packageHandler.js +50 -61
- package/dist/commands/generate/package/templates/test.ts.template +2 -2
- package/dist/commands/generate/package/templates/vitest.config.ts.template +9 -0
- package/dist/commands/generate/page/pageHandler.js +27 -24
- package/dist/commands/generate/realtime/realtime.js +2 -2
- package/dist/commands/generate/realtime/realtimeHandler.js +51 -32
- package/dist/commands/generate/realtime/templates/subscriptions/blank/blank.ts.template +1 -1
- package/dist/commands/generate/scaffold/scaffold.js +1 -0
- package/dist/commands/generate/scaffold/scaffoldHandler.js +176 -49
- package/dist/commands/generate/scaffold/templates/lib/formatters.tsx.template +1 -1
- package/dist/commands/generate/script/script.js +1 -0
- package/dist/commands/generate/script/scriptHandler.js +10 -6
- package/dist/commands/generate/script/templates/script.ts.template +9 -4
- package/dist/commands/generate/script/templates/tsconfig.json.template +16 -2
- package/dist/commands/generate/sdl/sdl.js +4 -3
- package/dist/commands/generate/sdl/sdlHandler.js +135 -46
- package/dist/commands/generate/sdl/stubFiles.js +132 -0
- package/dist/commands/generate/sdl/templates/sdl.js.template +2 -1
- package/dist/commands/generate/sdl/templates/sdl.ts.template +2 -1
- package/dist/commands/generate/secret/secret.js +20 -20
- package/dist/commands/generate/service/service.js +5 -5
- package/dist/commands/generate/service/serviceHandler.js +126 -61
- package/dist/commands/generate/service/templates/scenarios.ts.template +4 -2
- package/dist/commands/generate/service/templates/service.ts.template +22 -8
- package/dist/commands/generate/service/templates/test.ts.template +2 -2
- package/dist/commands/generate/yargsCommandHelpers.js +7 -2
- package/dist/commands/generate/yargsHandlerHelpers.js +20 -18
- package/dist/commands/generate.js +4 -4
- package/dist/commands/info.js +2 -2
- package/dist/commands/jobsHandler.js +7 -4
- package/dist/commands/lint.js +26 -69
- package/dist/commands/prerenderHandler.js +95 -58
- package/dist/commands/prismaHandler.js +51 -26
- package/dist/commands/record/init.js +2 -2
- package/dist/commands/record.js +4 -3
- package/dist/commands/serve.js +245 -31
- package/dist/commands/serveApiHandler.js +7 -6
- package/dist/commands/serveBothHandler.js +22 -13
- package/dist/commands/serveWebHandler.js +3 -2
- package/dist/commands/setup/auth/auth.js +15 -11
- package/dist/commands/setup/cache/cache.js +1 -1
- package/dist/commands/setup/cache/cacheHandler.js +15 -9
- package/dist/commands/setup/database/database.js +15 -0
- package/dist/commands/setup/database/postgres.js +19 -0
- package/dist/commands/setup/database/postgresHandler.js +196 -0
- package/dist/commands/setup/database/templates/db.ts.template +32 -0
- package/dist/commands/setup/deploy/deploy.js +4 -3
- package/dist/commands/setup/deploy/helpers/helpers.js +5 -1
- package/dist/commands/setup/deploy/helpers/index.js +132 -6
- package/dist/commands/setup/deploy/providers/baremetalHandler.js +28 -6
- package/dist/commands/setup/deploy/providers/coherence.js +1 -1
- package/dist/commands/setup/deploy/providers/coherenceHandler.js +60 -31
- package/dist/commands/setup/deploy/providers/flightcontrolHandler.js +69 -51
- package/dist/commands/setup/deploy/providers/netlify.js +6 -0
- package/dist/commands/setup/deploy/providers/netlifyHandler.js +114 -13
- package/dist/commands/setup/deploy/providers/renderHandler.js +44 -41
- package/dist/commands/setup/deploy/providers/serverlessHandler.js +7 -5
- package/dist/commands/setup/deploy/providers/universal-deploy.js +11 -0
- package/dist/commands/setup/deploy/providers/universalDeployHandler.js +186 -0
- package/dist/commands/setup/deploy/providers/vercel.js +6 -0
- package/dist/commands/setup/deploy/providers/vercelHandler.js +115 -14
- package/dist/commands/setup/deploy/templates/baremetal.js +3 -2
- package/dist/commands/setup/deploy/templates/flightcontrol.js +60 -49
- package/dist/commands/setup/deploy/templates/netlify.js +2 -1
- package/dist/commands/setup/deploy/templates/netlifyUD.js +31 -0
- package/dist/commands/setup/deploy/templates/render.js +32 -17
- package/dist/commands/setup/docker/docker.js +2 -2
- package/dist/commands/setup/docker/dockerHandler.js +74 -39
- package/dist/commands/setup/docker/templates/Dockerfile.npm +119 -0
- package/dist/commands/setup/docker/templates/Dockerfile.pnpm +112 -0
- package/dist/commands/setup/docker/templates/{Dockerfile → Dockerfile.yarn} +4 -7
- package/dist/commands/setup/docker/templates/docker-compose.dev.yml +3 -3
- package/dist/commands/setup/docker/templates/docker-compose.prod.yml +2 -5
- package/dist/commands/setup/docker/templates/dockerignore +1 -0
- package/dist/commands/setup/generator/generator.js +1 -1
- package/dist/commands/setup/generator/generatorHandler.js +5 -4
- package/dist/commands/setup/graphql/features/fragments/appGqlConfigTransform.js +6 -3
- package/dist/commands/setup/graphql/features/fragments/fragments.js +1 -1
- package/dist/commands/setup/graphql/features/fragments/fragmentsHandler.js +5 -7
- package/dist/commands/setup/graphql/features/trustedDocuments/trustedDocuments.js +1 -1
- package/dist/commands/setup/graphql/features/trustedDocuments/trustedDocumentsHandler.js +4 -3
- package/dist/commands/setup/i18n/i18n.js +1 -1
- package/dist/commands/setup/i18n/i18nHandler.js +21 -17
- package/dist/commands/setup/jobs/jobs.js +1 -1
- package/dist/commands/setup/jobs/jobsHandler.js +17 -12
- package/dist/commands/setup/mailer/mailer.js +1 -1
- package/dist/commands/setup/mailer/mailerHandler.js +13 -11
- package/dist/commands/setup/middleware/ogImage/ogImage.js +1 -1
- package/dist/commands/setup/middleware/ogImage/ogImageHandler.js +2 -1
- package/dist/commands/setup/monitoring/sentry/sentry.js +1 -1
- package/dist/commands/setup/monitoring/sentry/sentryHandler.js +18 -12
- package/dist/commands/setup/neon/neon.js +35 -0
- package/dist/commands/setup/neon/neonHandler.js +264 -0
- package/dist/commands/setup/package/package.js +1 -1
- package/dist/commands/setup/package/packageHandler.js +18 -14
- package/dist/commands/setup/realtime/addRealtimeToGraphql.js +1 -1
- package/dist/commands/setup/realtime/realtime.js +1 -1
- package/dist/commands/setup/realtime/realtimeHandler.js +26 -37
- package/dist/commands/setup/realtime/templates/realtime.ts.template +1 -1
- package/dist/commands/setup/realtime/templates/subscriptions/countdown/countdown.ts.template +1 -1
- package/dist/commands/setup/realtime/templates/subscriptions/newMessage/newMessage.ts.template +1 -1
- package/dist/commands/setup/server-file/serverFile.js +1 -1
- package/dist/commands/setup/server-file/serverFileHandler.js +18 -10
- package/dist/commands/setup/tenancy/authCodemod.js +66 -0
- package/dist/commands/setup/tenancy/dbCodemod.js +64 -0
- package/dist/commands/setup/tenancy/graphqlCodemod.js +88 -0
- package/dist/commands/setup/tenancy/preflight.js +49 -0
- package/dist/commands/setup/tenancy/schemaPrisma.js +81 -0
- package/dist/commands/setup/tenancy/signupCodemod.js +153 -0
- package/dist/commands/setup/tenancy/templates/InvitePage.tsx.template +63 -0
- package/dist/commands/setup/tenancy/templates/OrgScope.tsx.template +40 -0
- package/dist/commands/setup/tenancy/templates/ensureDefaultOrganizations.dataMigration.ts.template +39 -0
- package/dist/commands/setup/tenancy/templates/organizations.scenarios.ts.template +59 -0
- package/dist/commands/setup/tenancy/templates/organizations.sdl.ts.template +89 -0
- package/dist/commands/setup/tenancy/templates/organizations.test.ts.template +389 -0
- package/dist/commands/setup/tenancy/templates/organizations.ts.template +394 -0
- package/dist/commands/setup/tenancy/templates/requireMembership.test.ts.template +35 -0
- package/dist/commands/setup/tenancy/templates/requireMembership.ts.template +25 -0
- package/dist/commands/setup/tenancy/tenancy.js +30 -0
- package/dist/commands/setup/tenancy/tenancyHandler.js +425 -0
- package/dist/commands/setup/ui/helpers/helpers.js +5 -1
- package/dist/commands/setup/ui/libraries/chakra-uiHandler.js +16 -8
- package/dist/commands/setup/ui/libraries/mantineHandler.js +26 -16
- package/dist/commands/setup/ui/libraries/tailwindcssHandler.js +40 -29
- package/dist/commands/setup/uploads/schemaPrisma.js +41 -0
- package/dist/commands/setup/uploads/serverFile.js +151 -0
- package/dist/commands/setup/uploads/templates/requireUploadToken.ts.template +15 -0
- package/dist/commands/setup/uploads/templates/srcLibUploads.ts.template +23 -24
- package/dist/commands/setup/uploads/templates/uploads.sdl.ts.template +79 -0
- package/dist/commands/setup/uploads/templates/uploads.ts.template +89 -0
- package/dist/commands/setup/uploads/templates/withDataUri.ts.template +14 -0
- package/dist/commands/setup/uploads/templates/withSignedUrl.ts.template +16 -0
- package/dist/commands/setup/uploads/uploads.js +49 -7
- package/dist/commands/setup/uploads/uploadsHandler.js +266 -72
- package/dist/commands/setup.js +5 -4
- package/dist/commands/studio.js +1 -1
- package/dist/commands/studioHandler.js +2 -2
- package/dist/commands/test/datasourceWarning.js +42 -0
- package/dist/commands/test/testHandler.js +104 -0
- package/dist/commands/test/viteVersionCheck.js +75 -0
- package/dist/commands/test.js +16 -19
- package/dist/commands/type-check.js +2 -1
- package/dist/commands/type-checkHandler.js +25 -18
- package/dist/commands/upgrade/preUpgradeScripts.js +11 -11
- package/dist/commands/upgrade/upgrade.js +4 -2
- package/dist/commands/upgrade/upgradeHandler.js +97 -73
- package/dist/index.js +15 -11
- package/dist/lib/background.js +22 -1
- package/dist/lib/configureStorybook.js +2 -2
- package/dist/lib/exec.js +68 -63
- package/dist/lib/exit.js +20 -5
- package/dist/lib/extendFile.js +23 -13
- package/dist/lib/generatePrismaClient.js +48 -12
- package/dist/lib/index.js +137 -106
- package/dist/lib/loadEnvFiles.js +1 -1
- package/dist/lib/locking.js +8 -4
- package/dist/lib/merge/algorithms.js +4 -1
- package/dist/lib/merge/index.js +78 -41
- package/dist/lib/merge/semanticIdentity.js +18 -6
- package/dist/lib/merge/strategy.js +86 -36
- package/dist/lib/packages.js +23 -13
- package/dist/lib/plugin.js +13 -7
- package/dist/lib/pluralHelpers.js +6 -2
- package/dist/lib/project.js +3 -1
- package/dist/lib/rollback.js +7 -7
- package/dist/lib/schemaHelpers.js +16 -19
- package/dist/lib/test.js +20 -5
- package/dist/lib/updateCheck.js +47 -18
- package/dist/middleware/checkNodeVersion.js +9 -4
- package/dist/middleware/{detectProjectRxVersion.js → detectProjectCedarVersion.js} +2 -2
- package/dist/plugin.js +18 -12
- package/dist/telemetry/exporter.js +12 -5
- package/dist/telemetry/index.js +4 -3
- package/dist/telemetry/resource.js +9 -12
- package/dist/telemetry/send.js +14 -10
- package/dist/testLib/cells.js +5 -3
- package/package.json +44 -41
- package/LICENSE +0 -21
- package/dist/commands/consoleHandler.js +0 -68
- package/dist/commands/setup/tsconfig/tsconfig.js +0 -25
- package/dist/commands/setup/tsconfig/tsconfigHandler.js +0 -59
- package/dist/commands/setup/uploads/dbCodemod.js +0 -28
- package/dist/commands/setup/uploads/templates/signedUrl.ts.template +0 -21
- package/dist/commands/setup/vite/templates/vite.config.ts.template +0 -19
- package/dist/commands/setup/vite/vite.js +0 -38
- package/dist/commands/setup/vite/viteHandler.js +0 -83
- package/dist/commands/testEsm.js +0 -36
- package/dist/commands/testHandler.js +0 -137
- package/dist/commands/testHandlerEsm.js +0 -85
- package/dist/commands/ts-to-js.js +0 -20
- package/dist/lib/cedarPluralize.js +0 -56
- package/dist/lib/colors.js +0 -18
- package/dist/testLib/getFilesWithPattern.js +0 -21
- /package/dist/{index.d.js → global.d.js} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cedarjs/cli",
|
|
3
|
-
"version": "9.0.0-canary.
|
|
3
|
+
"version": "9.0.0-canary.3124",
|
|
4
4
|
"description": "The CedarJS Command Line",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"dist"
|
|
21
21
|
],
|
|
22
22
|
"scripts": {
|
|
23
|
-
"build": "
|
|
23
|
+
"build": "node ./build.mts",
|
|
24
24
|
"build:pack": "yarn pack -o cedarjs-cli.tgz",
|
|
25
25
|
"build:types": "tsc --build --verbose ./tsconfig.build.json",
|
|
26
26
|
"build:watch": "nodemon --watch src --ext \"js,jsx,ts,tsx,template\" --ignore dist --exec \"yarn build && yarn fix:permissions\"",
|
|
@@ -31,36 +31,39 @@
|
|
|
31
31
|
"test:watch": "vitest watch"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@babel/
|
|
35
|
-
"@babel/
|
|
36
|
-
"@babel/
|
|
37
|
-
"@
|
|
38
|
-
"@
|
|
39
|
-
"@cedarjs/
|
|
40
|
-
"@cedarjs/
|
|
41
|
-
"@cedarjs/
|
|
42
|
-
"@cedarjs/
|
|
43
|
-
"@cedarjs/
|
|
44
|
-
"@cedarjs/
|
|
45
|
-
"@cedarjs/
|
|
46
|
-
"@
|
|
47
|
-
"@
|
|
34
|
+
"@babel/core": "^7.26.10",
|
|
35
|
+
"@babel/parser": "7.29.8",
|
|
36
|
+
"@babel/preset-typescript": "7.29.7",
|
|
37
|
+
"@babel/traverse": "7.29.8",
|
|
38
|
+
"@babel/types": "7.29.8",
|
|
39
|
+
"@cedarjs/api-server": "9.0.0-canary.3124",
|
|
40
|
+
"@cedarjs/babel-config": "9.0.0-canary.3124",
|
|
41
|
+
"@cedarjs/cli-helpers": "9.0.0-canary.3124",
|
|
42
|
+
"@cedarjs/internal": "9.0.0-canary.3124",
|
|
43
|
+
"@cedarjs/prerender": "9.0.0-canary.3124",
|
|
44
|
+
"@cedarjs/project-config": "9.0.0-canary.3124",
|
|
45
|
+
"@cedarjs/structure": "9.0.0-canary.3124",
|
|
46
|
+
"@cedarjs/telemetry": "9.0.0-canary.3124",
|
|
47
|
+
"@cedarjs/utils": "9.0.0-canary.3124",
|
|
48
|
+
"@cedarjs/vite": "9.0.0-canary.3124",
|
|
49
|
+
"@cedarjs/web-server": "9.0.0-canary.3124",
|
|
50
|
+
"@listr2/prompt-adapter-enquirer": "4.3.2",
|
|
51
|
+
"@opentelemetry/api": "1.9.1",
|
|
48
52
|
"@opentelemetry/core": "1.30.1",
|
|
49
53
|
"@opentelemetry/exporter-trace-otlp-http": "0.57.2",
|
|
50
54
|
"@opentelemetry/resources": "1.30.1",
|
|
51
55
|
"@opentelemetry/sdk-trace-node": "1.30.1",
|
|
52
|
-
"@opentelemetry/semantic-conventions": "1.
|
|
53
|
-
"@prisma/internals": "
|
|
54
|
-
"ansis": "4.
|
|
56
|
+
"@opentelemetry/semantic-conventions": "1.41.1",
|
|
57
|
+
"@prisma/internals": "7.10.0",
|
|
58
|
+
"ansis": "4.3.1",
|
|
55
59
|
"archiver": "7.0.1",
|
|
56
60
|
"boxen": "5.1.2",
|
|
61
|
+
"camel-case": "4.1.2",
|
|
57
62
|
"camelcase": "6.3.0",
|
|
58
63
|
"change-case": "4.1.2",
|
|
59
64
|
"ci-info": "4.4.0",
|
|
60
|
-
"concurrently": "9.2.
|
|
65
|
+
"concurrently": "9.2.4",
|
|
61
66
|
"configstore": "7.1.0",
|
|
62
|
-
"core-js": "3.48.0",
|
|
63
|
-
"cross-env": "7.0.3",
|
|
64
67
|
"decamelize": "6.0.1",
|
|
65
68
|
"dotenv-defaults": "5.0.2",
|
|
66
69
|
"enquirer": "2.4.1",
|
|
@@ -68,43 +71,43 @@
|
|
|
68
71
|
"execa": "5.1.1",
|
|
69
72
|
"fast-glob": "3.3.3",
|
|
70
73
|
"humanize-string": "2.1.0",
|
|
71
|
-
"jscodeshift": "17.
|
|
74
|
+
"jscodeshift": "17.4.0",
|
|
72
75
|
"jsonc-parser": "3.3.1",
|
|
73
76
|
"latest-version": "9.0.0",
|
|
74
|
-
"listr2": "
|
|
75
|
-
"lodash": "4.
|
|
77
|
+
"listr2": "10.2.2",
|
|
78
|
+
"lodash": "4.18.1",
|
|
76
79
|
"pascalcase": "1.0.0",
|
|
77
80
|
"pluralize": "8.0.0",
|
|
78
81
|
"portfinder": "1.0.38",
|
|
79
|
-
"prettier": "3.
|
|
80
|
-
"prisma": "
|
|
82
|
+
"prettier": "3.9.6",
|
|
83
|
+
"prisma": "7.10.0",
|
|
81
84
|
"prompts": "2.4.2",
|
|
82
|
-
"
|
|
83
|
-
"
|
|
84
|
-
"semver": "7.7.4",
|
|
85
|
-
"smol-toml": "1.6.0",
|
|
85
|
+
"smol-toml": "1.8.0",
|
|
86
|
+
"srvx": "0.12.7",
|
|
86
87
|
"string-env-interpolation": "1.0.1",
|
|
87
|
-
"systeminformation": "5.
|
|
88
|
+
"systeminformation": "5.33.8",
|
|
88
89
|
"termi-link": "1.1.0",
|
|
89
90
|
"title-case": "3.0.3",
|
|
90
91
|
"unionfs": "4.6.0",
|
|
91
92
|
"uuid": "11.1.0",
|
|
92
|
-
"
|
|
93
|
-
"yargs": "17.7.
|
|
93
|
+
"verkit": "0.4.0",
|
|
94
|
+
"yargs": "17.7.3"
|
|
94
95
|
},
|
|
95
96
|
"devDependencies": {
|
|
96
|
-
"@
|
|
97
|
-
"@
|
|
97
|
+
"@cedarjs/framework-tools": "9.0.0-canary.3124",
|
|
98
|
+
"@prisma/dmmf": "7.10.0",
|
|
98
99
|
"@types/archiver": "^7.0.0",
|
|
99
|
-
"memfs": "4.
|
|
100
|
+
"memfs": "4.68.2",
|
|
100
101
|
"node-ssh": "13.2.1",
|
|
101
|
-
"ts-dedent": "2.
|
|
102
|
-
"tsx": "4.21.0",
|
|
102
|
+
"ts-dedent": "2.3.0",
|
|
103
103
|
"typescript": "5.9.3",
|
|
104
|
-
"vitest": "
|
|
104
|
+
"vitest": "4.1.11"
|
|
105
|
+
},
|
|
106
|
+
"engines": {
|
|
107
|
+
"node": ">=24"
|
|
105
108
|
},
|
|
106
109
|
"publishConfig": {
|
|
107
110
|
"access": "public"
|
|
108
111
|
},
|
|
109
|
-
"gitHead": "
|
|
112
|
+
"gitHead": "3905ed045508b861b495f8d5630d76c7a157d8f1"
|
|
110
113
|
}
|
package/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2025 Cedar
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import fs from "node:fs";
|
|
2
|
-
import { createRequire } from "node:module";
|
|
3
|
-
import path from "node:path";
|
|
4
|
-
import repl from "node:repl";
|
|
5
|
-
import { registerApiSideBabelHook } from "@cedarjs/babel-config";
|
|
6
|
-
import { recordTelemetryAttributes } from "@cedarjs/cli-helpers";
|
|
7
|
-
import { getPaths } from "../lib/index.js";
|
|
8
|
-
const paths = getPaths();
|
|
9
|
-
const loadPrismaClient = (replContext) => {
|
|
10
|
-
const createdRequire = createRequire(import.meta.url);
|
|
11
|
-
const { db } = createdRequire(path.join(paths.api.lib, "db"));
|
|
12
|
-
db[Symbol.for("nodejs.util.inspect.custom")] = "PrismaClient";
|
|
13
|
-
replContext.db = db;
|
|
14
|
-
};
|
|
15
|
-
const consoleHistoryFile = path.join(paths.generated.base, "console_history");
|
|
16
|
-
const persistConsoleHistory = (r) => {
|
|
17
|
-
fs.appendFileSync(
|
|
18
|
-
consoleHistoryFile,
|
|
19
|
-
r.lines.filter((line) => line.trim()).join("\n") + "\n",
|
|
20
|
-
"utf8"
|
|
21
|
-
);
|
|
22
|
-
};
|
|
23
|
-
const loadConsoleHistory = async (r) => {
|
|
24
|
-
try {
|
|
25
|
-
const history = await fs.promises.readFile(consoleHistoryFile, "utf8");
|
|
26
|
-
history.split("\n").reverse().map((line) => r.history.push(line));
|
|
27
|
-
} catch (e) {
|
|
28
|
-
}
|
|
29
|
-
};
|
|
30
|
-
const handler = () => {
|
|
31
|
-
recordTelemetryAttributes({
|
|
32
|
-
command: "console"
|
|
33
|
-
});
|
|
34
|
-
registerApiSideBabelHook({
|
|
35
|
-
plugins: [
|
|
36
|
-
[
|
|
37
|
-
"babel-plugin-module-resolver",
|
|
38
|
-
{
|
|
39
|
-
alias: {
|
|
40
|
-
src: paths.api.src
|
|
41
|
-
}
|
|
42
|
-
},
|
|
43
|
-
"rwjs-console-module-resolver"
|
|
44
|
-
]
|
|
45
|
-
]
|
|
46
|
-
});
|
|
47
|
-
const r = repl.start();
|
|
48
|
-
const defaultEval = r.eval;
|
|
49
|
-
r.eval = (cmd, context, filename, callback) => {
|
|
50
|
-
defaultEval(cmd, context, filename, async (err, result) => {
|
|
51
|
-
if (err) {
|
|
52
|
-
callback(err);
|
|
53
|
-
} else {
|
|
54
|
-
try {
|
|
55
|
-
callback(null, await Promise.resolve(result));
|
|
56
|
-
} catch (err2) {
|
|
57
|
-
callback(err2);
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
});
|
|
61
|
-
};
|
|
62
|
-
loadConsoleHistory(r);
|
|
63
|
-
r.addListener("close", () => persistConsoleHistory(r));
|
|
64
|
-
loadPrismaClient(r.context);
|
|
65
|
-
};
|
|
66
|
-
export {
|
|
67
|
-
handler
|
|
68
|
-
};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { recordTelemetryAttributes } from "@cedarjs/cli-helpers";
|
|
2
|
-
const command = "tsconfig";
|
|
3
|
-
const description = "Set up tsconfig for web and api sides";
|
|
4
|
-
const builder = (yargs) => {
|
|
5
|
-
yargs.option("force", {
|
|
6
|
-
alias: "f",
|
|
7
|
-
default: false,
|
|
8
|
-
description: "Overwrite existing tsconfig.json files",
|
|
9
|
-
type: "boolean"
|
|
10
|
-
});
|
|
11
|
-
};
|
|
12
|
-
const handler = async (options) => {
|
|
13
|
-
recordTelemetryAttributes({
|
|
14
|
-
command: "setup tsconfig",
|
|
15
|
-
force: options.force
|
|
16
|
-
});
|
|
17
|
-
const { handler: handler2 } = await import("./tsconfigHandler.js");
|
|
18
|
-
return handler2(options);
|
|
19
|
-
};
|
|
20
|
-
export {
|
|
21
|
-
builder,
|
|
22
|
-
command,
|
|
23
|
-
description,
|
|
24
|
-
handler
|
|
25
|
-
};
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import path from "path";
|
|
2
|
-
import { Listr } from "listr2";
|
|
3
|
-
import { errorTelemetry } from "@cedarjs/telemetry";
|
|
4
|
-
import c from "../../../lib/colors.js";
|
|
5
|
-
import {
|
|
6
|
-
getInstalledCedarVersion,
|
|
7
|
-
getPaths,
|
|
8
|
-
saveRemoteFileToDisk
|
|
9
|
-
} from "../../../lib/index.js";
|
|
10
|
-
const handler = async ({ force }) => {
|
|
11
|
-
const installedRwVersion = await getInstalledCedarVersion();
|
|
12
|
-
const GITHUB_VERSION_TAG = installedRwVersion.match("canary") ? "main" : `v${installedRwVersion}`;
|
|
13
|
-
const CRWA_TEMPLATE_URL = `https://raw.githubusercontent.com/redwoodjs/redwood/${GITHUB_VERSION_TAG}/packages/create-cedar-app/templates/ts`;
|
|
14
|
-
const tasks = new Listr(
|
|
15
|
-
[
|
|
16
|
-
{
|
|
17
|
-
title: "Creating tsconfig in web",
|
|
18
|
-
task: () => {
|
|
19
|
-
const webConfigPath = path.join(getPaths().web.base, "tsconfig.json");
|
|
20
|
-
const templateUrl = `${CRWA_TEMPLATE_URL}/web/tsconfig.json`;
|
|
21
|
-
return saveRemoteFileToDisk(templateUrl, webConfigPath, {
|
|
22
|
-
overwriteExisting: force
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
title: "Creating tsconfig in api",
|
|
28
|
-
task: () => {
|
|
29
|
-
const webConfigPath = path.join(getPaths().api.base, "tsconfig.json");
|
|
30
|
-
const templateUrl = `${CRWA_TEMPLATE_URL}/api/tsconfig.json`;
|
|
31
|
-
return saveRemoteFileToDisk(templateUrl, webConfigPath, {
|
|
32
|
-
overwriteExisting: force
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
title: "One more thing...",
|
|
38
|
-
task: (_ctx, task) => {
|
|
39
|
-
task.title = `One more thing...
|
|
40
|
-
|
|
41
|
-
${c.tip("Quick link to the docs on configuring TypeScript")}
|
|
42
|
-
${c.link("https://cedarjs.com/docs/typescript")}
|
|
43
|
-
`;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
],
|
|
47
|
-
{ rendererOptions: { collapseSubtasks: false } }
|
|
48
|
-
);
|
|
49
|
-
try {
|
|
50
|
-
await tasks.run();
|
|
51
|
-
} catch (e) {
|
|
52
|
-
errorTelemetry(process.argv, e.message);
|
|
53
|
-
console.error(c.error(e.message));
|
|
54
|
-
process.exit(e?.exitCode || 1);
|
|
55
|
-
}
|
|
56
|
-
};
|
|
57
|
-
export {
|
|
58
|
-
handler
|
|
59
|
-
};
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import j from "jscodeshift";
|
|
2
|
-
function transform(fileInfo) {
|
|
3
|
-
const root = j(fileInfo.source);
|
|
4
|
-
const imports = root.find(j.ImportDeclaration);
|
|
5
|
-
imports.at(-1).insertAfter(
|
|
6
|
-
j.importDeclaration(
|
|
7
|
-
[j.importSpecifier(j.identifier("storagePrismaExtension"))],
|
|
8
|
-
j.literal("./uploads.js")
|
|
9
|
-
)
|
|
10
|
-
);
|
|
11
|
-
root.find(j.VariableDeclaration, { declarations: [{ id: { name: "db" } }] }).forEach((path) => {
|
|
12
|
-
const dbDeclaration = path.node.declarations[0];
|
|
13
|
-
if (j.VariableDeclarator.check(dbDeclaration) && j.NewExpression.check(dbDeclaration.init)) {
|
|
14
|
-
throw new Error("RW_CODEMOD_ERR_OLD_FORMAT");
|
|
15
|
-
}
|
|
16
|
-
if (j.VariableDeclarator.check(dbDeclaration) && j.Expression.check(dbDeclaration.init)) {
|
|
17
|
-
const newInit = j.callExpression(
|
|
18
|
-
j.memberExpression(dbDeclaration.init, j.identifier("$extends")),
|
|
19
|
-
[j.identifier("storagePrismaExtension")]
|
|
20
|
-
);
|
|
21
|
-
dbDeclaration.init = newInit;
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
return root.toSource();
|
|
25
|
-
}
|
|
26
|
-
export {
|
|
27
|
-
transform as default
|
|
28
|
-
};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import type { APIGatewayEvent, Context } from 'aws-lambda'
|
|
2
|
-
|
|
3
|
-
import type { SignatureValidationArgs } from '@cedarjs/storage/UrlSigner'
|
|
4
|
-
|
|
5
|
-
import { urlSigner, fsStorage } from 'src/lib/uploads'
|
|
6
|
-
|
|
7
|
-
export const handler = async (event: APIGatewayEvent, _context: Context) => {
|
|
8
|
-
const fileToReturn = urlSigner.validateSignature(
|
|
9
|
-
event.queryStringParameters as SignatureValidationArgs
|
|
10
|
-
)
|
|
11
|
-
|
|
12
|
-
const { contents, type } = await fsStorage.read(fileToReturn)
|
|
13
|
-
|
|
14
|
-
return {
|
|
15
|
-
statusCode: 200,
|
|
16
|
-
headers: {
|
|
17
|
-
'Content-Type': type,
|
|
18
|
-
},
|
|
19
|
-
body: contents,
|
|
20
|
-
}
|
|
21
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import dns from 'dns'
|
|
2
|
-
|
|
3
|
-
import { defineConfig, UserConfig } from 'vite'
|
|
4
|
-
|
|
5
|
-
import redwood from '@cedarjs/vite'
|
|
6
|
-
|
|
7
|
-
// See: https://vitejs.dev/config/server-options.html#server-host
|
|
8
|
-
// So that Vite will load on local instead of 127.0.0.1
|
|
9
|
-
dns.setDefaultResultOrder('verbatim')
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* https://vitejs.dev/config/
|
|
13
|
-
* @type {import('vite').UserConfig}
|
|
14
|
-
*/
|
|
15
|
-
const viteConfig: UserConfig = {
|
|
16
|
-
plugins: [redwood()],
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export default defineConfig(viteConfig)
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { recordTelemetryAttributes } from "@cedarjs/cli-helpers";
|
|
2
|
-
const command = "vite";
|
|
3
|
-
const description = "Configure the web side to use Vite";
|
|
4
|
-
const builder = (yargs) => {
|
|
5
|
-
yargs.option("force", {
|
|
6
|
-
alias: "f",
|
|
7
|
-
default: false,
|
|
8
|
-
description: "Overwrite existing configuration",
|
|
9
|
-
type: "boolean"
|
|
10
|
-
});
|
|
11
|
-
yargs.option("verbose", {
|
|
12
|
-
alias: "v",
|
|
13
|
-
default: false,
|
|
14
|
-
description: "Print more logs",
|
|
15
|
-
type: "boolean"
|
|
16
|
-
});
|
|
17
|
-
yargs.option("add-package", {
|
|
18
|
-
default: true,
|
|
19
|
-
description: "Allows you to skip adding the @cedarjs/vite package. Useful for testing",
|
|
20
|
-
type: "boolean"
|
|
21
|
-
});
|
|
22
|
-
};
|
|
23
|
-
const handler = async (options) => {
|
|
24
|
-
recordTelemetryAttributes({
|
|
25
|
-
command: "setup vite",
|
|
26
|
-
force: options.force,
|
|
27
|
-
verbose: options.verbose,
|
|
28
|
-
addPackage: options.addPackage
|
|
29
|
-
});
|
|
30
|
-
const { handler: handler2 } = await import("./viteHandler.js");
|
|
31
|
-
return handler2(options);
|
|
32
|
-
};
|
|
33
|
-
export {
|
|
34
|
-
builder,
|
|
35
|
-
command,
|
|
36
|
-
description,
|
|
37
|
-
handler
|
|
38
|
-
};
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
import fs from "node:fs";
|
|
2
|
-
import path from "path";
|
|
3
|
-
import { Listr } from "listr2";
|
|
4
|
-
import { addWebPackages } from "@cedarjs/cli-helpers";
|
|
5
|
-
import { errorTelemetry } from "@cedarjs/telemetry";
|
|
6
|
-
import c from "../../../lib/colors.js";
|
|
7
|
-
import { getPaths, transformTSToJS, writeFile } from "../../../lib/index.js";
|
|
8
|
-
import { isTypeScriptProject } from "../../../lib/project.js";
|
|
9
|
-
const { version } = JSON.parse(
|
|
10
|
-
fs.readFileSync(
|
|
11
|
-
path.resolve(import.meta.dirname, "../../../../package.json"),
|
|
12
|
-
"utf-8"
|
|
13
|
-
)
|
|
14
|
-
);
|
|
15
|
-
const handler = async ({ force, verbose, addPackage }) => {
|
|
16
|
-
const ts = isTypeScriptProject();
|
|
17
|
-
const tasks = new Listr(
|
|
18
|
-
[
|
|
19
|
-
{
|
|
20
|
-
title: "Adding vite.config.js...",
|
|
21
|
-
task: async () => {
|
|
22
|
-
const viteConfigPath = `${getPaths().web.base}/vite.config.${ts ? "ts" : "js"}`;
|
|
23
|
-
const templateContent = fs.readFileSync(
|
|
24
|
-
path.resolve(
|
|
25
|
-
import.meta.dirname,
|
|
26
|
-
"templates",
|
|
27
|
-
"vite.config.ts.template"
|
|
28
|
-
),
|
|
29
|
-
"utf-8"
|
|
30
|
-
);
|
|
31
|
-
const viteConfigContent = ts ? templateContent : await transformTSToJS(viteConfigPath, templateContent);
|
|
32
|
-
return writeFile(viteConfigPath, viteConfigContent, {
|
|
33
|
-
overwriteExisting: force
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
title: "Creating new entry point in `web/src/entry.client.{jsx,tsx}`...",
|
|
39
|
-
task: () => {
|
|
40
|
-
const entryPointFile = path.join(
|
|
41
|
-
getPaths().web.src,
|
|
42
|
-
`entry.client.${ts ? "tsx" : "jsx"}`
|
|
43
|
-
);
|
|
44
|
-
const content = fs.readFileSync(
|
|
45
|
-
path.join(
|
|
46
|
-
getPaths().base,
|
|
47
|
-
// NOTE we're copying over the index.js before babel transform
|
|
48
|
-
"node_modules/@cedarjs/web/src/entry/index.js"
|
|
49
|
-
),
|
|
50
|
-
"utf-8"
|
|
51
|
-
).replace("~redwood-app-root", "./App");
|
|
52
|
-
return writeFile(entryPointFile, content, {
|
|
53
|
-
overwriteExisting: force
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
// @NOTE: make sure its added as a dev package.
|
|
59
|
-
...addWebPackages(["-D", `@cedarjs/vite@${version}`]),
|
|
60
|
-
title: "Adding @cedarjs/vite dev dependency to web side...",
|
|
61
|
-
skip: () => {
|
|
62
|
-
if (!addPackage) {
|
|
63
|
-
return "Skipping package install, you will need to add @cedarjs/vite manaually as a dev-dependency on the web workspace";
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
],
|
|
68
|
-
{
|
|
69
|
-
rendererOptions: { collapseSubtasks: false },
|
|
70
|
-
renderer: verbose ? "verbose" : "default"
|
|
71
|
-
}
|
|
72
|
-
);
|
|
73
|
-
try {
|
|
74
|
-
await tasks.run();
|
|
75
|
-
} catch (e) {
|
|
76
|
-
errorTelemetry(process.argv, e.message);
|
|
77
|
-
console.error(c.error(e.message));
|
|
78
|
-
process.exit(e?.exitCode || 1);
|
|
79
|
-
}
|
|
80
|
-
};
|
|
81
|
-
export {
|
|
82
|
-
handler
|
|
83
|
-
};
|
package/dist/commands/testEsm.js
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { terminalLink } from "termi-link";
|
|
2
|
-
import c from "../lib/colors.js";
|
|
3
|
-
import { workspaces } from "../lib/project.js";
|
|
4
|
-
const command = "test [filter..]";
|
|
5
|
-
const description = "Run Vitest tests. Defaults to watch mode";
|
|
6
|
-
const builder = (yargs) => {
|
|
7
|
-
const cliDocsLink = terminalLink(
|
|
8
|
-
"CedarJS CLI Reference",
|
|
9
|
-
"https://cedarjs.com/docs/cli-commands#test"
|
|
10
|
-
);
|
|
11
|
-
const vitestTip = c.tip("yarn vitest --help");
|
|
12
|
-
yargs.strict(false).positional("filter", {
|
|
13
|
-
default: workspaces(),
|
|
14
|
-
description: "Which side(s) to test, and/or a regular expression to match against your test files to filter by",
|
|
15
|
-
type: "array"
|
|
16
|
-
}).option("db-push", {
|
|
17
|
-
describe: "Syncs the test database with your Prisma schema without requiring a migration. It creates a test database if it doesn't already exist.",
|
|
18
|
-
type: "boolean",
|
|
19
|
-
default: true
|
|
20
|
-
}).epilogue(
|
|
21
|
-
`For all available flags, run vitest cli directly ${vitestTip}
|
|
22
|
-
|
|
23
|
-
Also see the ${cliDocsLink}
|
|
24
|
-
`
|
|
25
|
-
);
|
|
26
|
-
};
|
|
27
|
-
const handler = async (options) => {
|
|
28
|
-
const { handler: handler2 } = await import("./testHandlerEsm.js");
|
|
29
|
-
return handler2(options);
|
|
30
|
-
};
|
|
31
|
-
export {
|
|
32
|
-
builder,
|
|
33
|
-
command,
|
|
34
|
-
description,
|
|
35
|
-
handler
|
|
36
|
-
};
|