@tinacms/scripts 1.1.1 → 1.1.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/LICENSE CHANGED
@@ -1,12 +1,4 @@
1
- Copyright (c) 2023-present Forestry.io Holdings Inc.
2
-
3
- Portions of the TinaCMS software are licensed as follows:
4
-
5
- * All software that resides under the "packages/@tinacms/datalayer/" and the "packages/@tinacms/graphql/" directories (the "Tina Data Layer"), is licensed under the license defined in "packages/@tinacms/datalayer/LICENSE".
6
-
7
- * All software outside of the above-mentioned directories is available under the "Apache 2.0" license as set forth below.
8
-
9
- Apache License
1
+ Apache License
10
2
  Version 2.0, January 2004
11
3
  http://www.apache.org/licenses/
12
4
 
@@ -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,269 +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
- 4.5: "18px",
181
- 5: "20px",
182
- 6: "24px",
183
- 7: "28px",
184
- 8: "32px",
185
- 9: "36px",
186
- 10: "40px",
187
- 11: "44px",
188
- 12: "48px",
189
- 14: "56px",
190
- 16: "64px",
191
- 18: "72px",
192
- 20: "80px",
193
- 24: "96px",
194
- 28: "114px",
195
- 32: "128px",
196
- 36: "144px",
197
- 40: "160px",
198
- 44: "176px",
199
- 48: "192px",
200
- 52: "208px",
201
- 56: "224px",
202
- 60: "240px",
203
- 64: "256px",
204
- 72: "288px",
205
- 80: "320px",
206
- 96: "384px"
207
- },
208
- borderRadius: {
209
- none: "0px",
210
- sm: "2px",
211
- DEFAULT: "4px",
212
- md: "6px",
213
- lg: "8px",
214
- xl: "12px",
215
- "2xl": "16px",
216
- "3xl": "24px",
217
- full: "9999px"
218
- },
219
- borderWidth: {
220
- DEFAULT: "1px",
221
- 0: "0",
222
- 2: "2px",
223
- 3: "3px",
224
- 4: "4px",
225
- 6: "6px",
226
- 8: "8px"
227
- },
228
- fontSize: {
229
- xs: ["13px", { lineHeight: "1.33" }],
230
- sm: ["14px", { lineHeight: "1.43" }],
231
- base: ["16px", { lineHeight: "1.5" }],
232
- md: ["16px", { lineHeight: "1.5" }],
233
- lg: ["18px", { lineHeight: "1.55" }],
234
- xl: ["20px", { lineHeight: "1.4" }],
235
- "2xl": ["24px", { lineHeight: "1.33" }],
236
- "3xl": ["30px", { lineHeight: "1.2" }],
237
- "4xl": ["36px", { lineHeight: "1.1" }],
238
- "5xl": ["48px", { lineHeight: "1" }],
239
- "6xl": ["60px", { lineHeight: "1" }],
240
- "7xl": ["72px", { lineHeight: "1" }],
241
- "8xl": ["96px", { lineHeight: "1" }],
242
- "9xl": ["128px", { lineHeight: "1" }]
243
- },
244
- opacity: {
245
- 0: "0",
246
- 5: ".05",
247
- 7: ".07",
248
- 10: ".1",
249
- 15: ".15",
250
- 20: ".2",
251
- 25: ".25",
252
- 30: ".3",
253
- 40: ".4",
254
- 50: ".5",
255
- 60: ".6",
256
- 70: ".7",
257
- 75: ".75",
258
- 80: ".8",
259
- 90: ".9",
260
- 100: "1"
261
- },
262
- zIndex: {
263
- "-1": -1,
264
- base: 9e3,
265
- panel: 9400,
266
- menu: 9800,
267
- chrome: 10200,
268
- overlay: 10600,
269
- modal: 10800,
270
- "0": 0,
271
- "10": 10,
272
- "20": 20,
273
- "30": 30,
274
- "40": 40,
275
- "25": 25,
276
- "50": 50,
277
- "75": 75,
278
- "100": 100,
279
- auto: "auto"
280
- },
281
- extend: {
282
- keyframes: {
283
- slideIn: {
284
- "0%": {
285
- opacity: "0",
286
- transform: "translateY(-1rem)"
287
- },
288
- "100%": {
289
- opacity: "1",
290
- transform: "translateY(0)"
291
- }
292
- },
293
- slideInLeft: {
294
- "0%": {
295
- opacity: "0",
296
- transform: "translateX(2rem)"
297
- },
298
- "100%": {
299
- opacity: "1",
300
- transform: "translateX(0)"
301
- }
302
- }
303
- },
304
- animation: {
305
- "slide-in": "slideIn 150ms ease-out 1 normal forwards",
306
- "slide-in-left": "slideInLeft 150ms ease-out 1 normal forwards",
307
- "spin-reverse": "spin 1s linear infinite reverse"
308
- },
309
- scale: {
310
- 97: ".97",
311
- 103: "1.03"
312
- },
313
- transitionDuration: {
314
- 0: "0ms",
315
- 2e3: "2000ms"
316
- },
317
- boxShadow: {
318
- xs: "0 0 0 1px rgba(0, 0, 0, 0.05)",
319
- outline: "0 0 0 3px rgba(66, 153, 225, 0.5)"
320
- },
321
- colors: {
322
- blue: {
323
- 50: "#DCEEFF",
324
- 100: "#B4DBFF",
325
- 200: "#85C5FE",
326
- 300: "#4EABFE",
327
- 400: "#2296fe",
328
- 500: "#0084FF",
329
- 600: "#0574e4",
330
- 700: "#0D5DBD",
331
- 800: "#144696",
332
- 900: "#1D2C6C",
333
- 1e3: "#241748"
334
- },
335
- gray: {
336
- 50: "#F6F6F9",
337
- 100: "#EDECF3",
338
- 150: "#E6E3EF",
339
- 200: "#E1DDEC",
340
- 250: "#C9C5D5",
341
- 300: "#b2adbe",
342
- 400: "#918c9e",
343
- 500: "#716c7f",
344
- 600: "#565165",
345
- 700: "#433e52",
346
- 800: "#363145",
347
- 900: "#252336",
348
- 1e3: "#1c1b2e"
349
- },
350
- orange: {
351
- 400: "#EB6337",
352
- 500: "#EC4815",
353
- 600: "#DC4419"
354
- }
355
- },
356
- fontFamily: {
357
- sans: ["Inter", ...defaultTheme.fontFamily.sans]
358
- },
359
- lineHeight: {
360
- 3: "12px",
361
- 4: "16px",
362
- 5: "20px",
363
- 6: "24px",
364
- 7: "28px",
365
- 8: "32px",
366
- 9: "36px",
367
- 10: "40px"
368
- },
369
- maxWidth: {
370
- form: "900px"
371
- },
372
- screens: {
373
- xs: "320px",
374
- sm: "560px",
375
- md: "720px",
376
- lg: "1030px"
377
- }
378
- }
379
- },
380
- content: [_path2.default.join(cwd, "src/**/*.{vue,js,ts,jsx,tsx,svelte}")],
381
- plugins: [
382
- _chunkNYQD2IPWjs.__require.call(void 0, "@tailwindcss/container-queries"),
383
- _chunkNYQD2IPWjs.__require.call(void 0, "@tailwindcss/typography")({
384
- className: "tina-prose"
385
- }),
386
- _chunkNYQD2IPWjs.__require.call(void 0, "@tailwindcss/line-clamp"),
387
- _chunkNYQD2IPWjs.__require.call(void 0, "@tailwindcss/aspect-ratio")
388
- ],
389
- corePlugins: {
390
- preflight: false
391
- }
392
- };
393
- };
394
132
  var buildIt = async (entryPoint, packageJSON) => {
395
133
  const entry = typeof entryPoint === "string" ? entryPoint : entryPoint.name;
396
134
  const target = typeof entryPoint === "string" ? "browser" : entryPoint.target;
397
135
  const deps = packageJSON.dependencies;
398
136
  const peerDeps = packageJSON.peerDependencies;
399
- 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));
400
138
  const globals = {};
401
139
  const out = (entry2) => {
402
140
  const { dir, name } = _path2.default.parse(entry2);
@@ -418,7 +156,7 @@ var buildIt = async (entryPoint, packageJSON) => {
418
156
  bundle: true,
419
157
  platform: "node",
420
158
  target: "node12",
421
- outfile: _path2.default.join(process.cwd(), "dist", "index.js"),
159
+ outfile: outInfo.outfile ? _path2.default.join(process.cwd(), "dist", `${outInfo.outfile}.js`) : _path2.default.join(process.cwd(), "dist", "index.js"),
422
160
  external: external.filter((item) => !packageJSON.buildConfig.entryPoints[0].bundle.includes(item))
423
161
  });
424
162
  await _esbuild.build.call(void 0, {
@@ -427,7 +165,7 @@ var buildIt = async (entryPoint, packageJSON) => {
427
165
  platform: "node",
428
166
  target: "es2020",
429
167
  format: "esm",
430
- outfile: _path2.default.join(process.cwd(), "dist", "index.mjs"),
168
+ outfile: outInfo.outfile ? _path2.default.join(process.cwd(), "dist", `${outInfo.outfile}.mjs`) : _path2.default.join(process.cwd(), "dist", "index.mjs"),
431
169
  external
432
170
  });
433
171
  } else if (["@tinacms/mdx"].includes(packageJSON.name)) {
@@ -439,7 +177,7 @@ var buildIt = async (entryPoint, packageJSON) => {
439
177
  target: "node12",
440
178
  format: "cjs",
441
179
  outfile: _path2.default.join(process.cwd(), "dist", "index.js"),
442
- external: Object.keys(_chunkNYQD2IPWjs.__spreadValues.call(void 0, {}, peerDeps2))
180
+ external: Object.keys(_chunkFTLKP6WHjs.__spreadValues.call(void 0, {}, peerDeps2))
443
181
  });
444
182
  await _esbuild.build.call(void 0, {
445
183
  entryPoints: [_path2.default.join(process.cwd(), entry)],
@@ -448,7 +186,7 @@ var buildIt = async (entryPoint, packageJSON) => {
448
186
  target: "es2020",
449
187
  format: "esm",
450
188
  outfile: _path2.default.join(process.cwd(), "dist", "index.mjs"),
451
- external: Object.keys(_chunkNYQD2IPWjs.__spreadValues.call(void 0, {}, peerDeps2))
189
+ external: Object.keys(_chunkFTLKP6WHjs.__spreadValues.call(void 0, {}, peerDeps2))
452
190
  });
453
191
  await _esbuild.build.call(void 0, {
454
192
  entryPoints: [_path2.default.join(process.cwd(), entry)],
@@ -457,7 +195,7 @@ var buildIt = async (entryPoint, packageJSON) => {
457
195
  target: "es2020",
458
196
  format: "esm",
459
197
  outfile: _path2.default.join(process.cwd(), "dist", "index.browser.mjs"),
460
- external: Object.keys(_chunkNYQD2IPWjs.__spreadValues.call(void 0, {}, peerDeps2))
198
+ external: Object.keys(_chunkFTLKP6WHjs.__spreadValues.call(void 0, {}, peerDeps2))
461
199
  });
462
200
  } else {
463
201
  await _esbuild.build.call(void 0, {
@@ -474,25 +212,12 @@ var buildIt = async (entryPoint, packageJSON) => {
474
212
  return true;
475
213
  }
476
214
  const defaultBuildConfig = {
477
- plugins: [
478
- {
479
- name: "vite-plugin-tina",
480
- config: (_, env) => {
481
- const plugins = [];
482
- const tw = _tailwindcss2.default.call(void 0, config(process.cwd()));
483
- plugins.push(_nesting2.default);
484
- plugins.push(_postcssnested2.default);
485
- plugins.push(tw);
486
- return {
487
- css: {
488
- postcss: {
489
- plugins
490
- }
491
- }
492
- };
493
- }
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")
494
219
  }
495
- ],
220
+ },
496
221
  build: {
497
222
  minify: false,
498
223
  assetsInlineLimit: 0,
@@ -515,8 +240,8 @@ var buildIt = async (entryPoint, packageJSON) => {
515
240
  }
516
241
  }
517
242
  };
518
- const buildConfig = packageJSON.buildConfig ? _chunkNYQD2IPWjs.__spreadValues.call(void 0, _chunkNYQD2IPWjs.__spreadValues.call(void 0, {}, defaultBuildConfig), packageJSON.buildConfig) : defaultBuildConfig;
519
- 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));
520
245
  await _fsextra2.default.outputFileSync(_path2.default.join(outInfo.outdir, `${outInfo.outfile}.d.ts`), `export * from "${outInfo.relativeOutfile}"`);
521
246
  return true;
522
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.1",
3
+ "version": "1.1.3",
4
4
  "main": "dist/index.js",
5
5
  "files": [
6
6
  "dist",
@@ -20,7 +20,6 @@
20
20
  "@tailwindcss/container-queries": "^0.1.0",
21
21
  "@tailwindcss/line-clamp": "^0.3.1",
22
22
  "@tailwindcss/typography": "^0.5.0",
23
- "@types/inquirer": "^6.5.0",
24
23
  "chalk": "^4.1.1",
25
24
  "chokidar": "^3.5.2",
26
25
  "commander": "^7.2.0",
@@ -33,7 +32,6 @@
33
32
  "meow": "^10.0.1",
34
33
  "normalize-path": "^3.0.0",
35
34
  "postcss": "^8.4.5",
36
- "postcss-nested": "^5.0.6",
37
35
  "tailwindcss": "^3.2.7",
38
36
  "tsup": "^4.12.5",
39
37
  "typescript": "^4.2.2",