@tinacms/scripts 1.1.4 → 1.1.6

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/index.js CHANGED
@@ -1,19 +1,63 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
2
-
3
- var _chunkFTLKP6WHjs = require('./chunk-FTLKP6WH.js');
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
9
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
10
+ var __spreadValues = (a, b) => {
11
+ for (var prop in b || (b = {}))
12
+ if (__hasOwnProp.call(b, prop))
13
+ __defNormalProp(a, prop, b[prop]);
14
+ if (__getOwnPropSymbols)
15
+ for (var prop of __getOwnPropSymbols(b)) {
16
+ if (__propIsEnum.call(b, prop))
17
+ __defNormalProp(a, prop, b[prop]);
18
+ }
19
+ return a;
20
+ };
21
+ var __export = (target, all) => {
22
+ for (var name in all)
23
+ __defProp(target, name, { get: all[name], enumerable: true });
24
+ };
25
+ var __copyProps = (to, from, except, desc) => {
26
+ if (from && typeof from === "object" || typeof from === "function") {
27
+ for (let key of __getOwnPropNames(from))
28
+ if (!__hasOwnProp.call(to, key) && key !== except)
29
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
30
+ }
31
+ return to;
32
+ };
33
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
34
+ // If the importer is in node compatibility mode or this is not an ESM
35
+ // file that has been converted to a CommonJS file using a Babel-
36
+ // compatible transform (i.e. "__esModule" has not been set), then set
37
+ // "default" to the CommonJS "module.exports" for node compatibility.
38
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
39
+ mod
40
+ ));
41
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
4
42
 
5
43
  // src/index.ts
6
- var _vite = require('vite');
7
- var _esbuild = require('esbuild');
8
- var _fsextra = require('fs-extra'); var _fsextra2 = _interopRequireDefault(_fsextra);
9
- var _path = require('path'); var _path2 = _interopRequireDefault(_path);
10
- var _chokidar = require('chokidar'); var _chokidar2 = _interopRequireDefault(_chokidar);
11
- var _child_process = require('child_process');
12
- var _chalk = require('chalk'); var _chalk2 = _interopRequireDefault(_chalk);
13
-
14
-
15
- var _commander = require('commander');
16
- var program = new (0, _commander.Command)("Tina Build");
44
+ var src_exports = {};
45
+ __export(src_exports, {
46
+ buildIt: () => buildIt,
47
+ init: () => init,
48
+ run: () => run,
49
+ sequential: () => sequential
50
+ });
51
+ module.exports = __toCommonJS(src_exports);
52
+ var import_vite = require("vite");
53
+ var import_esbuild = require("esbuild");
54
+ var import_fs_extra = __toESM(require("fs-extra"));
55
+ var import_node_path = __toESM(require("path"));
56
+ var import_chokidar = __toESM(require("chokidar"));
57
+ var import_node_child_process = require("child_process");
58
+ var import_chalk = __toESM(require("chalk"));
59
+ var commander = __toESM(require("commander"));
60
+ var program = new commander.Command("Tina Build");
17
61
  var registerCommands = (commands, noHelp = false) => {
18
62
  commands.forEach((command, i) => {
19
63
  let newCmd = program.command(command.command, { noHelp }).description(command.description).action((...args) => {
@@ -22,7 +66,7 @@ var registerCommands = (commands, noHelp = false) => {
22
66
  if (command.alias) {
23
67
  newCmd = newCmd.alias(command.alias);
24
68
  }
25
- newCmd.on("--help", function() {
69
+ newCmd.on("--help", () => {
26
70
  if (command.examples) {
27
71
  console.log(`
28
72
  Examples:
@@ -34,7 +78,9 @@ Examples:
34
78
  command.subCommands.forEach((subcommand, i2) => {
35
79
  const commandStr = `${subcommand.command}${(subcommand.options || []).length ? optionTag : ""}`;
36
80
  const padLength = Math.max(...command.subCommands.map((sub) => sub.command.length)) + optionTag.length;
37
- console.log(`${commandStr.padEnd(padLength)} ${subcommand.description}`);
81
+ console.log(
82
+ `${commandStr.padEnd(padLength)} ${subcommand.description}`
83
+ );
38
84
  });
39
85
  }
40
86
  console.log("");
@@ -53,12 +99,14 @@ var run = async (args) => {
53
99
  process.chdir(args.dir);
54
100
  }
55
101
  const packageDir = process.cwd();
56
- const packageJSON = JSON.parse(await _fsextra2.default.readFileSync(_path2.default.join(packageDir, "package.json")).toString());
102
+ const packageJSON = JSON.parse(
103
+ await import_fs_extra.default.readFileSync(import_node_path.default.join(packageDir, "package.json")).toString()
104
+ );
57
105
  if (["@tinacms/scripts", "@tinacms/webpack-helpers"].includes(packageJSON.name)) {
58
106
  console.log(`skipping ${packageJSON.name}`);
59
107
  return;
60
108
  }
61
- const successMessage = `${_chalk2.default.blue(`${packageJSON.name}`)} built in`;
109
+ const successMessage = `${import_chalk.default.blue(`${packageJSON.name}`)} built in`;
62
110
  console.time(successMessage);
63
111
  const entries = ((_a = packageJSON == null ? void 0 : packageJSON.buildConfig) == null ? void 0 : _a.entryPoints) || ["src/index.ts"];
64
112
  try {
@@ -74,7 +122,7 @@ var run = async (args) => {
74
122
  }
75
123
  };
76
124
  var watch = () => {
77
- _child_process.exec.call(void 0, "pnpm list -r --json", (error, stdout, stderr) => {
125
+ (0, import_node_child_process.exec)("pnpm list -r --json", (error, stdout, stderr) => {
78
126
  if (error) {
79
127
  console.error(`exec error: ${error}`);
80
128
  return;
@@ -82,11 +130,14 @@ var watch = () => {
82
130
  const json = JSON.parse(stdout);
83
131
  const watchPaths = [];
84
132
  json.forEach((pkg) => {
85
- if (pkg.path.includes(_path2.default.join("packages", ""))) {
133
+ if (pkg.path.includes(import_node_path.default.join("packages", ""))) {
86
134
  watchPaths.push(pkg.path);
87
135
  }
88
136
  });
89
- _chokidar2.default.watch(watchPaths.map((p) => _path2.default.join(p, "src", "**/*")), { ignored: ["**/spec/**/*", "node_modules"] }).on("change", async (path2) => {
137
+ import_chokidar.default.watch(
138
+ watchPaths.map((p) => import_node_path.default.join(p, "src", "**/*")),
139
+ { ignored: ["**/spec/**/*", "node_modules"] }
140
+ ).on("change", async (path2) => {
90
141
  const changedPackagePath = watchPaths.find((p) => path2.startsWith(p));
91
142
  await run({ dir: changedPackagePath });
92
143
  });
@@ -113,7 +164,10 @@ async function init(args) {
113
164
  ]);
114
165
  program.usage("command [options]");
115
166
  program.on("command:*", function() {
116
- console.error("Invalid command: %s\nSee --help for a list of available commands.", args.join(" "));
167
+ console.error(
168
+ "Invalid command: %s\nSee --help for a list of available commands.",
169
+ args.join(" ")
170
+ );
117
171
  process.exit(1);
118
172
  });
119
173
  program.on("--help", function() {
@@ -132,13 +186,17 @@ var buildIt = async (entryPoint, packageJSON) => {
132
186
  const target = typeof entryPoint === "string" ? "browser" : entryPoint.target;
133
187
  const deps = packageJSON.dependencies;
134
188
  const peerDeps = packageJSON.peerDependencies;
135
- const external = Object.keys(_chunkFTLKP6WHjs.__spreadValues.call(void 0, _chunkFTLKP6WHjs.__spreadValues.call(void 0, {}, deps), peerDeps));
189
+ const external = Object.keys(__spreadValues(__spreadValues({}, deps), peerDeps));
136
190
  const globals = {};
137
191
  const out = (entry2) => {
138
- const { dir, name } = _path2.default.parse(entry2);
192
+ const { dir, name } = import_node_path.default.parse(entry2);
139
193
  const outdir = dir.replace("src", "dist");
140
194
  const outfile = name;
141
- const relativeOutfile = _path2.default.join(outdir.split("/").map(() => "..").join("/"), dir, name);
195
+ const relativeOutfile = import_node_path.default.join(
196
+ outdir.split("/").map(() => "..").join("/"),
197
+ dir,
198
+ name
199
+ );
142
200
  return { outdir, outfile, relativeOutfile };
143
201
  };
144
202
  const outInfo = out(entry);
@@ -149,78 +207,100 @@ var buildIt = async (entryPoint, packageJSON) => {
149
207
  external.forEach((ext) => globals[ext] = "NOOP");
150
208
  if (target === "node") {
151
209
  if (["@tinacms/graphql", "@tinacms/datalayer"].includes(packageJSON.name)) {
152
- await _esbuild.build.call(void 0, {
153
- entryPoints: [_path2.default.join(process.cwd(), entry)],
210
+ await (0, import_esbuild.build)({
211
+ entryPoints: [import_node_path.default.join(process.cwd(), entry)],
154
212
  bundle: true,
155
213
  platform: "node",
214
+ // FIXME: no idea why but even though I'm on node14 it doesn't like
215
+ // the syntax for optional chaining, should be supported on 14
216
+ // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Optional_chaining
156
217
  target: "node12",
157
- outfile: outInfo.outfile ? _path2.default.join(process.cwd(), "dist", `${outInfo.outfile}.js`) : _path2.default.join(process.cwd(), "dist", "index.js"),
158
- external: external.filter((item) => !packageJSON.buildConfig.entryPoints[0].bundle.includes(item))
218
+ // Use the outfile if it is provided
219
+ outfile: outInfo.outfile ? import_node_path.default.join(process.cwd(), "dist", `${outInfo.outfile}.js`) : import_node_path.default.join(process.cwd(), "dist", "index.js"),
220
+ external: external.filter(
221
+ (item) => !packageJSON.buildConfig.entryPoints[0].bundle.includes(item)
222
+ )
159
223
  });
160
- await _esbuild.build.call(void 0, {
161
- entryPoints: [_path2.default.join(process.cwd(), entry)],
224
+ await (0, import_esbuild.build)({
225
+ entryPoints: [import_node_path.default.join(process.cwd(), entry)],
162
226
  bundle: true,
163
227
  platform: "node",
164
228
  target: "es2020",
165
229
  format: "esm",
166
- outfile: outInfo.outfile ? _path2.default.join(process.cwd(), "dist", `${outInfo.outfile}.mjs`) : _path2.default.join(process.cwd(), "dist", "index.mjs"),
230
+ outfile: outInfo.outfile ? import_node_path.default.join(process.cwd(), "dist", `${outInfo.outfile}.mjs`) : import_node_path.default.join(process.cwd(), "dist", "index.mjs"),
167
231
  external
168
232
  });
169
233
  } else if (["@tinacms/mdx"].includes(packageJSON.name)) {
170
234
  const peerDeps2 = packageJSON.peerDependencies;
171
- await _esbuild.build.call(void 0, {
172
- entryPoints: [_path2.default.join(process.cwd(), entry)],
235
+ await (0, import_esbuild.build)({
236
+ entryPoints: [import_node_path.default.join(process.cwd(), entry)],
173
237
  bundle: true,
174
238
  platform: "node",
239
+ // FIXME: no idea why but even though I'm on node14 it doesn't like
240
+ // the syntax for optional chaining, should be supported on 14
241
+ // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Optional_chaining
175
242
  target: "node12",
176
243
  format: "cjs",
177
- outfile: _path2.default.join(process.cwd(), "dist", "index.js"),
178
- external: Object.keys(_chunkFTLKP6WHjs.__spreadValues.call(void 0, {}, peerDeps2))
244
+ outfile: import_node_path.default.join(process.cwd(), "dist", "index.js"),
245
+ external: Object.keys(__spreadValues({}, peerDeps2))
179
246
  });
180
- await _esbuild.build.call(void 0, {
181
- entryPoints: [_path2.default.join(process.cwd(), entry)],
247
+ await (0, import_esbuild.build)({
248
+ entryPoints: [import_node_path.default.join(process.cwd(), entry)],
182
249
  bundle: true,
183
250
  platform: "node",
184
251
  target: "es2020",
185
252
  format: "esm",
186
- outfile: _path2.default.join(process.cwd(), "dist", "index.mjs"),
187
- external: Object.keys(_chunkFTLKP6WHjs.__spreadValues.call(void 0, {}, peerDeps2))
253
+ outfile: import_node_path.default.join(process.cwd(), "dist", "index.mjs"),
254
+ // Bundle dependencies, the remark ecosystem only publishes ES modules
255
+ // and includes "development" export maps which actually throw errors during
256
+ // development, which we don't want to expose our users to.
257
+ external: Object.keys(__spreadValues({}, peerDeps2))
188
258
  });
189
- await _esbuild.build.call(void 0, {
190
- entryPoints: [_path2.default.join(process.cwd(), entry)],
259
+ await (0, import_esbuild.build)({
260
+ entryPoints: [import_node_path.default.join(process.cwd(), entry)],
191
261
  bundle: true,
192
262
  platform: "browser",
193
263
  target: "es2020",
194
264
  format: "esm",
195
- outfile: _path2.default.join(process.cwd(), "dist", "index.browser.mjs"),
196
- external: Object.keys(_chunkFTLKP6WHjs.__spreadValues.call(void 0, {}, peerDeps2))
265
+ outfile: import_node_path.default.join(process.cwd(), "dist", "index.browser.mjs"),
266
+ // Bundle dependencies, the remark ecosystem only publishes ES modules
267
+ // and includes "development" export maps which actually throw errors during
268
+ // development, which we don't want to expose our users to.
269
+ external: Object.keys(__spreadValues({}, peerDeps2))
197
270
  });
198
271
  } else {
199
- await _esbuild.build.call(void 0, {
200
- entryPoints: [_path2.default.join(process.cwd(), entry)],
272
+ await (0, import_esbuild.build)({
273
+ entryPoints: [import_node_path.default.join(process.cwd(), entry)],
201
274
  bundle: true,
202
275
  platform: "node",
203
- outfile: _path2.default.join(process.cwd(), "dist", `${outInfo.outfile}.js`),
276
+ outfile: import_node_path.default.join(process.cwd(), "dist", `${outInfo.outfile}.js`),
204
277
  external,
205
278
  target: "node12"
206
279
  });
207
280
  }
208
- const extension = _path2.default.extname(entry);
209
- await _fsextra2.default.writeFileSync(_path2.default.join(process.cwd(), "dist", entry.replace("src/", "").replace(extension, ".d.ts")), `export * from "../${entry.replace(extension, "")}"`);
281
+ const extension = import_node_path.default.extname(entry);
282
+ await import_fs_extra.default.writeFileSync(
283
+ import_node_path.default.join(
284
+ process.cwd(),
285
+ "dist",
286
+ entry.replace("src/", "").replace(extension, ".d.ts")
287
+ ),
288
+ `export * from "../${entry.replace(extension, "")}"`
289
+ );
210
290
  return true;
211
291
  }
212
292
  const defaultBuildConfig = {
213
293
  resolve: {
214
294
  alias: {
215
- "@toolkit": _path2.default.resolve(process.cwd(), "src/toolkit"),
216
- "@tinacms/toolkit": _path2.default.resolve(process.cwd(), "src/toolkit/index.ts")
295
+ "@toolkit": import_node_path.default.resolve(process.cwd(), "src/toolkit"),
296
+ "@tinacms/toolkit": import_node_path.default.resolve(process.cwd(), "src/toolkit/index.ts")
217
297
  }
218
298
  },
219
299
  build: {
220
300
  minify: false,
221
301
  assetsInlineLimit: 0,
222
302
  lib: {
223
- entry: _path2.default.resolve(process.cwd(), entry),
303
+ entry: import_node_path.default.resolve(process.cwd(), entry),
224
304
  name: packageJSON.name,
225
305
  fileName: (format) => {
226
306
  return format === "umd" ? `${outInfo.outfile}.js` : `${outInfo.outfile}.mjs`;
@@ -228,9 +308,28 @@ var buildIt = async (entryPoint, packageJSON) => {
228
308
  },
229
309
  outDir: outInfo.outdir,
230
310
  emptyOutDir: false,
311
+ // we build multiple files in to the dir
231
312
  sourcemap: false,
313
+ // true | 'inline' (note: inline will go straight into your bundle size)
232
314
  rollupOptions: {
315
+ // /**
316
+ // * FIXME: rollup-plugin-node-polyfills is only needed for node targets
317
+ // */
233
318
  plugins: [],
319
+ /**
320
+ * For some reason Rollup thinks it needs a global, though
321
+ * I'm pretty sure it doesn't, since everything works
322
+ *
323
+ * By setting a global for each external dep we're silencing these warnings
324
+ * No name was provided for external module 'react-beautiful-dnd' in output.globals – guessing 'reactBeautifulDnd'
325
+ *
326
+ * They don't occur for es builds, only UMD and I can't quite find
327
+ * an authoritative response on wny they're needed or how they're
328
+ * used in the UMD context.
329
+ *
330
+ * https://github.com/rollup/rollup/issues/1514#issuecomment-321877507
331
+ * https://github.com/rollup/rollup/issues/1169#issuecomment-268815735
332
+ */
234
333
  output: {
235
334
  globals
236
335
  },
@@ -238,9 +337,12 @@ var buildIt = async (entryPoint, packageJSON) => {
238
337
  }
239
338
  }
240
339
  };
241
- const buildConfig = packageJSON.buildConfig ? _chunkFTLKP6WHjs.__spreadValues.call(void 0, _chunkFTLKP6WHjs.__spreadValues.call(void 0, {}, defaultBuildConfig), packageJSON.buildConfig) : defaultBuildConfig;
242
- await _vite.build.call(void 0, _chunkFTLKP6WHjs.__spreadValues.call(void 0, {}, buildConfig));
243
- await _fsextra2.default.outputFileSync(_path2.default.join(outInfo.outdir, `${outInfo.outfile}.d.ts`), `export * from "${outInfo.relativeOutfile}"`);
340
+ const buildConfig = packageJSON.buildConfig ? __spreadValues(__spreadValues({}, defaultBuildConfig), packageJSON.buildConfig) : defaultBuildConfig;
341
+ await (0, import_vite.build)(__spreadValues({}, buildConfig));
342
+ await import_fs_extra.default.outputFileSync(
343
+ import_node_path.default.join(outInfo.outdir, `${outInfo.outfile}.d.ts`),
344
+ `export * from "${outInfo.relativeOutfile}"`
345
+ );
244
346
  return true;
245
347
  };
246
348
  var sequential = async (items, callback) => {
@@ -261,9 +363,10 @@ var sequential = async (items, callback) => {
261
363
  }
262
364
  return accum;
263
365
  };
264
-
265
-
266
-
267
-
268
-
269
- exports.buildIt = buildIt; exports.init = init; exports.run = run; exports.sequential = sequential;
366
+ // Annotate the CommonJS export names for ESM import in node:
367
+ 0 && (module.exports = {
368
+ buildIt,
369
+ init,
370
+ run,
371
+ sequential
372
+ });
@@ -1,31 +1,55 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
2
-
3
- var _chunkFTLKP6WHjs = require('./chunk-FTLKP6WH.js');
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
4
28
 
5
29
  // src/jest-runner.ts
6
- var _jestplugin = require('@sucrase/jest-plugin'); var _jestplugin2 = _interopRequireDefault(_jestplugin);
7
- var require_jest_runner = _chunkFTLKP6WHjs.__commonJS.call(void 0, {
8
- "src/jest-runner.ts"(exports, module) {
9
- var config = {
10
- verbose: true,
11
- transform: {
12
- ".(ts|tsx)": "@tinacms/scripts/dist/jest-runner.js",
13
- ".(js)": "@tinacms/scripts/dist/jest-runner.js"
14
- },
15
- transformIgnorePatterns: [],
16
- testRegex: "(\\.spec|.test)\\.(ts|tsx|js)$",
17
- modulePaths: ["<rootDir>/dir/", "<rootDir>/node_modules/"],
18
- moduleFileExtensions: ["ts", "tsx", "js", "jsx"],
19
- testPathIgnorePatterns: ["/dist/"],
20
- moduleNameMapper: {
21
- "\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "<rootDir>/../../__mocks__/fileMock.js",
22
- "\\.(css|less|scss|sass)$": "@tinacms/scripts/__mocks__/styleMock.js"
23
- }
24
- };
25
- module.exports = {
26
- process: _jestplugin2.default.process,
27
- config
28
- };
29
- }
30
+ var jest_runner_exports = {};
31
+ __export(jest_runner_exports, {
32
+ default: () => jest_runner_default
30
33
  });
31
- exports. default = require_jest_runner();
34
+ module.exports = __toCommonJS(jest_runner_exports);
35
+ var import_jest_plugin = __toESM(require("@sucrase/jest-plugin"));
36
+ var config = {
37
+ verbose: true,
38
+ transform: {
39
+ ".(ts|tsx)": "@tinacms/scripts/dist/jest-runner.js",
40
+ ".(js)": "@tinacms/scripts/dist/jest-runner.js"
41
+ },
42
+ transformIgnorePatterns: [],
43
+ testRegex: "(\\.spec|.test)\\.(ts|tsx|js)$",
44
+ modulePaths: ["<rootDir>/dir/", "<rootDir>/node_modules/"],
45
+ moduleFileExtensions: ["ts", "tsx", "js", "jsx"],
46
+ testPathIgnorePatterns: ["/dist/"],
47
+ moduleNameMapper: {
48
+ "\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "<rootDir>/../../__mocks__/fileMock.js",
49
+ "\\.(css|less|scss|sass)$": "@tinacms/scripts/__mocks__/styleMock.js"
50
+ }
51
+ };
52
+ var jest_runner_default = {
53
+ process: import_jest_plugin.default.process,
54
+ config
55
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tinacms/scripts",
3
- "version": "1.1.4",
3
+ "version": "1.1.6",
4
4
  "main": "dist/index.js",
5
5
  "files": [
6
6
  "dist",
@@ -13,34 +13,19 @@
13
13
  "tinacms-scripts": "./bin/tina-build"
14
14
  },
15
15
  "dependencies": {
16
- "@babel/core": "^7.21.0",
17
- "@babel/plugin-transform-modules-commonjs": "^7.15.0",
18
- "@sucrase/jest-plugin": "^2.1.1",
19
- "@tailwindcss/aspect-ratio": "^0.4.0",
20
- "@tailwindcss/container-queries": "^0.1.0",
21
- "@tailwindcss/line-clamp": "^0.3.1",
22
- "@tailwindcss/typography": "^0.5.0",
16
+ "@sucrase/jest-plugin": "^3.0.0",
23
17
  "chalk": "^4.1.1",
24
18
  "chokidar": "^3.5.2",
25
19
  "commander": "^7.2.0",
26
20
  "esbuild": "^0.15.5",
27
- "execa": "^5.1.1",
28
- "express": "^4.17.1",
29
21
  "fs-extra": "^9.0.1",
30
- "identity-obj-proxy": "^3.0.0",
31
- "jest": "^29.5.0",
32
- "meow": "^10.0.1",
33
- "normalize-path": "^3.0.0",
34
- "postcss": "^8.4.5",
35
- "tailwindcss": "^3.2.7",
36
- "tsup": "^4.12.5",
37
- "typescript": "^4.2.2",
38
- "vite": "^4.3.9",
39
- "yargs": "^17.0.1"
22
+ "tsup": "^8.1.2",
23
+ "typescript": "^5.5.3",
24
+ "vite": "^4.3.9"
40
25
  },
41
26
  "scripts": {
42
27
  "build:all": "bin/tina-build build:all",
43
28
  "watch": "node bin/tina-build watch",
44
- "build": "yarn tsup src/jest-runner.ts src/css-transform.ts src/index.ts --format cjs"
29
+ "build": "pnpm tsup src/jest-runner.ts src/css-transform.ts src/index.ts --format cjs"
45
30
  }
46
31
  }
@@ -1,24 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var __defProp = Object.defineProperty;
2
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
3
- var __hasOwnProp = Object.prototype.hasOwnProperty;
4
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
5
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
6
- var __spreadValues = (a, b) => {
7
- for (var prop in b || (b = {}))
8
- if (__hasOwnProp.call(b, prop))
9
- __defNormalProp(a, prop, b[prop]);
10
- if (__getOwnPropSymbols)
11
- for (var prop of __getOwnPropSymbols(b)) {
12
- if (__propIsEnum.call(b, prop))
13
- __defNormalProp(a, prop, b[prop]);
14
- }
15
- return a;
16
- };
17
- var __commonJS = (cb, mod) => function __require() {
18
- return mod || (0, cb[Object.keys(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
19
- };
20
-
21
-
22
-
23
-
24
- exports.__spreadValues = __spreadValues; exports.__commonJS = __commonJS;