@tinacms/scripts 1.1.0 → 1.1.2

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.
@@ -14,19 +14,11 @@ var __spreadValues = (a, b) => {
14
14
  }
15
15
  return a;
16
16
  };
17
- var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
18
- get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
19
- }) : x)(function(x) {
20
- if (typeof require !== "undefined")
21
- return require.apply(this, arguments);
22
- throw new Error('Dynamic require of "' + x + '" is not supported');
23
- });
24
- var __commonJS = (cb, mod) => function __require2() {
17
+ var __commonJS = (cb, mod) => function __require() {
25
18
  return mod || (0, cb[Object.keys(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
26
19
  };
27
20
 
28
21
 
29
22
 
30
23
 
31
-
32
- exports.__spreadValues = __spreadValues; exports.__require = __require; exports.__commonJS = __commonJS;
24
+ exports.__spreadValues = __spreadValues; exports.__commonJS = __commonJS;
package/dist/index.js CHANGED
@@ -1,7 +1,6 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
2
2
 
3
-
4
- var _chunkNYQD2IPWjs = require('./chunk-NYQD2IPW.js');
3
+ var _chunkFTLKP6WHjs = require('./chunk-FTLKP6WH.js');
5
4
 
6
5
  // src/index.ts
7
6
  var _vite = require('vite');
@@ -11,13 +10,9 @@ var _path = require('path'); var _path2 = _interopRequireDefault(_path);
11
10
  var _chokidar = require('chokidar'); var _chokidar2 = _interopRequireDefault(_chokidar);
12
11
  var _child_process = require('child_process');
13
12
  var _chalk = require('chalk'); var _chalk2 = _interopRequireDefault(_chalk);
14
- var _tailwindcss = require('tailwindcss'); var _tailwindcss2 = _interopRequireDefault(_tailwindcss);
15
- var _postcssnested = require('postcss-nested'); var _postcssnested2 = _interopRequireDefault(_postcssnested);
16
- var _nesting = require('tailwindcss/nesting'); var _nesting2 = _interopRequireDefault(_nesting);
17
13
 
18
14
 
19
15
  var _commander = require('commander');
20
- var defaultTheme = _chunkNYQD2IPWjs.__require.call(void 0, "tailwindcss/defaultTheme");
21
16
  var program = new (0, _commander.Command)("Tina Build");
22
17
  var registerCommands = (commands, noHelp = false) => {
23
18
  commands.forEach((command, i) => {
@@ -134,268 +129,12 @@ e.g: "forestry types:gen --help"
134
129
  }
135
130
  program.parse(args);
136
131
  }
137
- var config = (cwd = "") => {
138
- return {
139
- important: ".tina-tailwind",
140
- theme: {
141
- columns: {
142
- auto: "auto",
143
- 1: "1",
144
- 2: "2",
145
- 3: "3",
146
- 4: "4",
147
- 5: "5",
148
- 6: "6",
149
- 7: "7",
150
- 8: "8",
151
- 9: "9",
152
- 10: "10",
153
- 11: "11",
154
- 12: "12",
155
- "3xs": "256px",
156
- "2xs": "288px",
157
- xs: "320px",
158
- sm: "384px",
159
- md: "448px",
160
- lg: "512px",
161
- xl: "576px",
162
- "2xl": "672px",
163
- "3xl": "768px",
164
- "4xl": "896px",
165
- "5xl": "1024px",
166
- "6xl": "1152px",
167
- "7xl": "1280px"
168
- },
169
- spacing: {
170
- px: "1px",
171
- 0: "0px",
172
- 0.5: "2px",
173
- 1: "4px",
174
- 1.5: "6px",
175
- 2: "8px",
176
- 2.5: "10px",
177
- 3: "12px",
178
- 3.5: "14px",
179
- 4: "16px",
180
- 5: "20px",
181
- 6: "24px",
182
- 7: "28px",
183
- 8: "32px",
184
- 9: "36px",
185
- 10: "40px",
186
- 11: "44px",
187
- 12: "48px",
188
- 14: "56px",
189
- 16: "64px",
190
- 18: "72px",
191
- 20: "80px",
192
- 24: "96px",
193
- 28: "114px",
194
- 32: "128px",
195
- 36: "144px",
196
- 40: "160px",
197
- 44: "176px",
198
- 48: "192px",
199
- 52: "208px",
200
- 56: "224px",
201
- 60: "240px",
202
- 64: "256px",
203
- 72: "288px",
204
- 80: "320px",
205
- 96: "384px"
206
- },
207
- borderRadius: {
208
- none: "0px",
209
- sm: "2px",
210
- DEFAULT: "4px",
211
- md: "6px",
212
- lg: "8px",
213
- xl: "12px",
214
- "2xl": "16px",
215
- "3xl": "24px",
216
- full: "9999px"
217
- },
218
- borderWidth: {
219
- DEFAULT: "1px",
220
- 0: "0",
221
- 2: "2px",
222
- 3: "3px",
223
- 4: "4px",
224
- 6: "6px",
225
- 8: "8px"
226
- },
227
- fontSize: {
228
- xs: ["13px", { lineHeight: "1.33" }],
229
- sm: ["14px", { lineHeight: "1.43" }],
230
- base: ["16px", { lineHeight: "1.5" }],
231
- md: ["16px", { lineHeight: "1.5" }],
232
- lg: ["18px", { lineHeight: "1.55" }],
233
- xl: ["20px", { lineHeight: "1.4" }],
234
- "2xl": ["24px", { lineHeight: "1.33" }],
235
- "3xl": ["30px", { lineHeight: "1.2" }],
236
- "4xl": ["36px", { lineHeight: "1.1" }],
237
- "5xl": ["48px", { lineHeight: "1" }],
238
- "6xl": ["60px", { lineHeight: "1" }],
239
- "7xl": ["72px", { lineHeight: "1" }],
240
- "8xl": ["96px", { lineHeight: "1" }],
241
- "9xl": ["128px", { lineHeight: "1" }]
242
- },
243
- opacity: {
244
- 0: "0",
245
- 5: ".05",
246
- 7: ".07",
247
- 10: ".1",
248
- 15: ".15",
249
- 20: ".2",
250
- 25: ".25",
251
- 30: ".3",
252
- 40: ".4",
253
- 50: ".5",
254
- 60: ".6",
255
- 70: ".7",
256
- 75: ".75",
257
- 80: ".8",
258
- 90: ".9",
259
- 100: "1"
260
- },
261
- zIndex: {
262
- "-1": -1,
263
- base: 9e3,
264
- panel: 9400,
265
- menu: 9800,
266
- chrome: 10200,
267
- overlay: 10600,
268
- modal: 10800,
269
- "0": 0,
270
- "10": 10,
271
- "20": 20,
272
- "30": 30,
273
- "40": 40,
274
- "25": 25,
275
- "50": 50,
276
- "75": 75,
277
- "100": 100,
278
- auto: "auto"
279
- },
280
- extend: {
281
- keyframes: {
282
- slideIn: {
283
- "0%": {
284
- opacity: "0",
285
- transform: "translateY(-1rem)"
286
- },
287
- "100%": {
288
- opacity: "1",
289
- transform: "translateY(0)"
290
- }
291
- },
292
- slideInLeft: {
293
- "0%": {
294
- opacity: "0",
295
- transform: "translateX(2rem)"
296
- },
297
- "100%": {
298
- opacity: "1",
299
- transform: "translateX(0)"
300
- }
301
- }
302
- },
303
- animation: {
304
- "slide-in": "slideIn 150ms ease-out 1 normal forwards",
305
- "slide-in-left": "slideInLeft 150ms ease-out 1 normal forwards",
306
- "spin-reverse": "spin 1s linear infinite reverse"
307
- },
308
- scale: {
309
- 97: ".97",
310
- 103: "1.03"
311
- },
312
- transitionDuration: {
313
- 0: "0ms",
314
- 2e3: "2000ms"
315
- },
316
- boxShadow: {
317
- xs: "0 0 0 1px rgba(0, 0, 0, 0.05)",
318
- outline: "0 0 0 3px rgba(66, 153, 225, 0.5)"
319
- },
320
- colors: {
321
- blue: {
322
- 50: "#DCEEFF",
323
- 100: "#B4DBFF",
324
- 200: "#85C5FE",
325
- 300: "#4EABFE",
326
- 400: "#2296fe",
327
- 500: "#0084FF",
328
- 600: "#0574e4",
329
- 700: "#0D5DBD",
330
- 800: "#144696",
331
- 900: "#1D2C6C",
332
- 1e3: "#241748"
333
- },
334
- gray: {
335
- 50: "#F6F6F9",
336
- 100: "#EDECF3",
337
- 150: "#E6E3EF",
338
- 200: "#E1DDEC",
339
- 250: "#C9C5D5",
340
- 300: "#b2adbe",
341
- 400: "#918c9e",
342
- 500: "#716c7f",
343
- 600: "#565165",
344
- 700: "#433e52",
345
- 800: "#363145",
346
- 900: "#252336",
347
- 1e3: "#1c1b2e"
348
- },
349
- orange: {
350
- 400: "#EB6337",
351
- 500: "#EC4815",
352
- 600: "#DC4419"
353
- }
354
- },
355
- fontFamily: {
356
- sans: ["Inter", ...defaultTheme.fontFamily.sans]
357
- },
358
- lineHeight: {
359
- 3: "12px",
360
- 4: "16px",
361
- 5: "20px",
362
- 6: "24px",
363
- 7: "28px",
364
- 8: "32px",
365
- 9: "36px",
366
- 10: "40px"
367
- },
368
- maxWidth: {
369
- form: "900px"
370
- },
371
- screens: {
372
- xs: "320px",
373
- sm: "560px",
374
- md: "720px",
375
- lg: "1030px"
376
- }
377
- }
378
- },
379
- content: [_path2.default.join(cwd, "src/**/*.{vue,js,ts,jsx,tsx,svelte}")],
380
- plugins: [
381
- _chunkNYQD2IPWjs.__require.call(void 0, "@tailwindcss/container-queries"),
382
- _chunkNYQD2IPWjs.__require.call(void 0, "@tailwindcss/typography")({
383
- className: "tina-prose"
384
- }),
385
- _chunkNYQD2IPWjs.__require.call(void 0, "@tailwindcss/line-clamp"),
386
- _chunkNYQD2IPWjs.__require.call(void 0, "@tailwindcss/aspect-ratio")
387
- ],
388
- corePlugins: {
389
- preflight: false
390
- }
391
- };
392
- };
393
132
  var buildIt = async (entryPoint, packageJSON) => {
394
133
  const entry = typeof entryPoint === "string" ? entryPoint : entryPoint.name;
395
134
  const target = typeof entryPoint === "string" ? "browser" : entryPoint.target;
396
135
  const deps = packageJSON.dependencies;
397
136
  const peerDeps = packageJSON.peerDependencies;
398
- const external = Object.keys(_chunkNYQD2IPWjs.__spreadValues.call(void 0, _chunkNYQD2IPWjs.__spreadValues.call(void 0, {}, deps), peerDeps));
137
+ const external = Object.keys(_chunkFTLKP6WHjs.__spreadValues.call(void 0, _chunkFTLKP6WHjs.__spreadValues.call(void 0, {}, deps), peerDeps));
399
138
  const globals = {};
400
139
  const out = (entry2) => {
401
140
  const { dir, name } = _path2.default.parse(entry2);
@@ -426,7 +165,7 @@ var buildIt = async (entryPoint, packageJSON) => {
426
165
  platform: "node",
427
166
  target: "es2020",
428
167
  format: "esm",
429
- outfile: _path2.default.join(process.cwd(), "dist", "index.es.js"),
168
+ outfile: _path2.default.join(process.cwd(), "dist", "index.mjs"),
430
169
  external
431
170
  });
432
171
  } else if (["@tinacms/mdx"].includes(packageJSON.name)) {
@@ -438,7 +177,7 @@ var buildIt = async (entryPoint, packageJSON) => {
438
177
  target: "node12",
439
178
  format: "cjs",
440
179
  outfile: _path2.default.join(process.cwd(), "dist", "index.js"),
441
- external: Object.keys(_chunkNYQD2IPWjs.__spreadValues.call(void 0, {}, peerDeps2))
180
+ external: Object.keys(_chunkFTLKP6WHjs.__spreadValues.call(void 0, {}, peerDeps2))
442
181
  });
443
182
  await _esbuild.build.call(void 0, {
444
183
  entryPoints: [_path2.default.join(process.cwd(), entry)],
@@ -446,8 +185,8 @@ var buildIt = async (entryPoint, packageJSON) => {
446
185
  platform: "node",
447
186
  target: "es2020",
448
187
  format: "esm",
449
- outfile: _path2.default.join(process.cwd(), "dist", "index.es.js"),
450
- external: Object.keys(_chunkNYQD2IPWjs.__spreadValues.call(void 0, {}, peerDeps2))
188
+ outfile: _path2.default.join(process.cwd(), "dist", "index.mjs"),
189
+ external: Object.keys(_chunkFTLKP6WHjs.__spreadValues.call(void 0, {}, peerDeps2))
451
190
  });
452
191
  await _esbuild.build.call(void 0, {
453
192
  entryPoints: [_path2.default.join(process.cwd(), entry)],
@@ -455,8 +194,8 @@ var buildIt = async (entryPoint, packageJSON) => {
455
194
  platform: "browser",
456
195
  target: "es2020",
457
196
  format: "esm",
458
- outfile: _path2.default.join(process.cwd(), "dist", "index.browser.es.js"),
459
- external: Object.keys(_chunkNYQD2IPWjs.__spreadValues.call(void 0, {}, peerDeps2))
197
+ outfile: _path2.default.join(process.cwd(), "dist", "index.browser.mjs"),
198
+ external: Object.keys(_chunkFTLKP6WHjs.__spreadValues.call(void 0, {}, peerDeps2))
460
199
  });
461
200
  } else {
462
201
  await _esbuild.build.call(void 0, {
@@ -473,25 +212,12 @@ var buildIt = async (entryPoint, packageJSON) => {
473
212
  return true;
474
213
  }
475
214
  const defaultBuildConfig = {
476
- plugins: [
477
- {
478
- name: "vite-plugin-tina",
479
- config: (_, env) => {
480
- let plugins = [];
481
- const tw = _tailwindcss2.default.call(void 0, config(process.cwd()));
482
- plugins.push(_nesting2.default);
483
- plugins.push(_postcssnested2.default);
484
- plugins.push(tw);
485
- return {
486
- css: {
487
- postcss: {
488
- plugins
489
- }
490
- }
491
- };
492
- }
215
+ resolve: {
216
+ alias: {
217
+ "@toolkit": _path2.default.resolve(process.cwd(), "src/toolkit"),
218
+ "@tinacms/toolkit": _path2.default.resolve(process.cwd(), "src/toolkit/index.ts")
493
219
  }
494
- ],
220
+ },
495
221
  build: {
496
222
  minify: false,
497
223
  assetsInlineLimit: 0,
@@ -499,7 +225,7 @@ var buildIt = async (entryPoint, packageJSON) => {
499
225
  entry: _path2.default.resolve(process.cwd(), entry),
500
226
  name: packageJSON.name,
501
227
  fileName: (format) => {
502
- return format === "umd" ? `${outInfo.outfile}.js` : `${outInfo.outfile}.es.js`;
228
+ return format === "umd" ? `${outInfo.outfile}.js` : `${outInfo.outfile}.mjs`;
503
229
  }
504
230
  },
505
231
  outDir: outInfo.outdir,
@@ -514,8 +240,8 @@ var buildIt = async (entryPoint, packageJSON) => {
514
240
  }
515
241
  }
516
242
  };
517
- const buildConfig = packageJSON.buildConfig ? _chunkNYQD2IPWjs.__spreadValues.call(void 0, _chunkNYQD2IPWjs.__spreadValues.call(void 0, {}, defaultBuildConfig), packageJSON.buildConfig) : defaultBuildConfig;
518
- await _vite.build.call(void 0, _chunkNYQD2IPWjs.__spreadValues.call(void 0, {}, buildConfig));
243
+ const buildConfig = packageJSON.buildConfig ? _chunkFTLKP6WHjs.__spreadValues.call(void 0, _chunkFTLKP6WHjs.__spreadValues.call(void 0, {}, defaultBuildConfig), packageJSON.buildConfig) : defaultBuildConfig;
244
+ await _vite.build.call(void 0, _chunkFTLKP6WHjs.__spreadValues.call(void 0, {}, buildConfig));
519
245
  await _fsextra2.default.outputFileSync(_path2.default.join(outInfo.outdir, `${outInfo.outfile}.d.ts`), `export * from "${outInfo.relativeOutfile}"`);
520
246
  return true;
521
247
  };
@@ -1,10 +1,10 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
2
2
 
3
- var _chunkNYQD2IPWjs = require('./chunk-NYQD2IPW.js');
3
+ var _chunkFTLKP6WHjs = require('./chunk-FTLKP6WH.js');
4
4
 
5
5
  // src/jest-runner.ts
6
6
  var _jestplugin = require('@sucrase/jest-plugin'); var _jestplugin2 = _interopRequireDefault(_jestplugin);
7
- var require_jest_runner = _chunkNYQD2IPWjs.__commonJS.call(void 0, {
7
+ var require_jest_runner = _chunkFTLKP6WHjs.__commonJS.call(void 0, {
8
8
  "src/jest-runner.ts"(exports, module) {
9
9
  var config = {
10
10
  verbose: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tinacms/scripts",
3
- "version": "1.1.0",
3
+ "version": "1.1.2",
4
4
  "main": "dist/index.js",
5
5
  "files": [
6
6
  "dist",
@@ -25,21 +25,18 @@
25
25
  "chokidar": "^3.5.2",
26
26
  "commander": "^7.2.0",
27
27
  "esbuild": "^0.15.5",
28
- "esbuild-jest": "^0.5.0",
29
28
  "execa": "^5.1.1",
30
29
  "express": "^4.17.1",
31
30
  "fs-extra": "^9.0.1",
32
31
  "identity-obj-proxy": "^3.0.0",
33
- "jest": "^27.0.6",
32
+ "jest": "^29.5.0",
34
33
  "meow": "^10.0.1",
35
34
  "normalize-path": "^3.0.0",
36
35
  "postcss": "^8.4.5",
37
- "postcss-nested": "^5.0.6",
38
36
  "tailwindcss": "^3.2.7",
39
37
  "tsup": "^4.12.5",
40
38
  "typescript": "^4.2.2",
41
- "vite": "^2.4.3",
42
- "vite-plugin-dts": "^0.5.3",
39
+ "vite": "^4.3.9",
43
40
  "yargs": "^17.0.1"
44
41
  },
45
42
  "scripts": {