@cedarjs/cli 7.0.0-canary.3011 → 7.0.0-canary.3012

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.
Files changed (2) hide show
  1. package/dist/lib/index.js +5 -25
  2. package/package.json +13 -13
package/dist/lib/index.js CHANGED
@@ -1,7 +1,6 @@
1
1
  import fs from "node:fs";
2
2
  import https from "node:https";
3
3
  import path from "node:path";
4
- import * as babel from "@babel/core";
5
4
  import boxen from "boxen";
6
5
  import camelcase from "camelcase";
7
6
  import { paramCase } from "change-case";
@@ -12,7 +11,7 @@ import memoize from "lodash/memoize.js";
12
11
  import template from "lodash/template.js";
13
12
  import pascalcase from "pascalcase";
14
13
  import { format } from "prettier";
15
- import { colors as c } from "@cedarjs/cli-helpers";
14
+ import { colors as c, transpileTSToJS } from "@cedarjs/cli-helpers";
16
15
  import {
17
16
  addRootPackages,
18
17
  addWorkspacePackages
@@ -206,29 +205,10 @@ const getPrettierOptions = async () => {
206
205
  }
207
206
  };
208
207
  const transformTSToJS = async (filename, content) => {
209
- const result = babel.transform(content, {
210
- filename,
211
- // If you ran `yarn cedar generate` in `./web` transformSync would import
212
- // the `.babelrc.js` file, in `./web` despite us setting `configFile: false`
213
- cwd: process.env.NODE_ENV === "test" ? void 0 : getPaths().base,
214
- configFile: false,
215
- plugins: [
216
- [
217
- "@babel/plugin-transform-typescript",
218
- {
219
- isTSX: true,
220
- allExtensions: true
221
- }
222
- ]
223
- ],
224
- retainLines: true
225
- });
226
- if (result?.code == null) {
227
- throw new Error(
228
- `Could not transform ${filename} from TypeScript to JavaScript`
229
- );
230
- }
231
- return prettify(filename.replace(/\.ts(x)?$/, ".js$1"), result.code);
208
+ return prettify(
209
+ filename.replace(/\.ts(x)?$/, ".js$1"),
210
+ transpileTSToJS(filename, content)
211
+ );
232
212
  };
233
213
  const transformTSToJSMap = async (files, typescript) => {
234
214
  return files.reduce(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cedarjs/cli",
3
- "version": "7.0.0-canary.3011",
3
+ "version": "7.0.0-canary.3012",
4
4
  "description": "The CedarJS Command Line",
5
5
  "repository": {
6
6
  "type": "git",
@@ -36,17 +36,17 @@
36
36
  "@babel/preset-typescript": "7.29.7",
37
37
  "@babel/traverse": "7.29.8",
38
38
  "@babel/types": "7.29.8",
39
- "@cedarjs/api-server": "7.0.0-canary.3011",
40
- "@cedarjs/babel-config": "7.0.0-canary.3011",
41
- "@cedarjs/cli-helpers": "7.0.0-canary.3011",
42
- "@cedarjs/internal": "7.0.0-canary.3011",
43
- "@cedarjs/prerender": "7.0.0-canary.3011",
44
- "@cedarjs/project-config": "7.0.0-canary.3011",
45
- "@cedarjs/structure": "7.0.0-canary.3011",
46
- "@cedarjs/telemetry": "7.0.0-canary.3011",
47
- "@cedarjs/utils": "7.0.0-canary.3011",
48
- "@cedarjs/vite": "7.0.0-canary.3011",
49
- "@cedarjs/web-server": "7.0.0-canary.3011",
39
+ "@cedarjs/api-server": "7.0.0-canary.3012",
40
+ "@cedarjs/babel-config": "7.0.0-canary.3012",
41
+ "@cedarjs/cli-helpers": "7.0.0-canary.3012",
42
+ "@cedarjs/internal": "7.0.0-canary.3012",
43
+ "@cedarjs/prerender": "7.0.0-canary.3012",
44
+ "@cedarjs/project-config": "7.0.0-canary.3012",
45
+ "@cedarjs/structure": "7.0.0-canary.3012",
46
+ "@cedarjs/telemetry": "7.0.0-canary.3012",
47
+ "@cedarjs/utils": "7.0.0-canary.3012",
48
+ "@cedarjs/vite": "7.0.0-canary.3012",
49
+ "@cedarjs/web-server": "7.0.0-canary.3012",
50
50
  "@listr2/prompt-adapter-enquirer": "4.3.0",
51
51
  "@opentelemetry/api": "1.9.1",
52
52
  "@opentelemetry/core": "1.30.1",
@@ -94,7 +94,7 @@
94
94
  "yargs": "17.7.3"
95
95
  },
96
96
  "devDependencies": {
97
- "@cedarjs/framework-tools": "7.0.0-canary.3011",
97
+ "@cedarjs/framework-tools": "7.0.0-canary.3012",
98
98
  "@prisma/dmmf": "7.8.0",
99
99
  "@types/archiver": "^7.0.0",
100
100
  "memfs": "4.68.1",