@tamagui/cli 1.41.1 → 1.42.1
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/package.json +7 -7
- package/dist/generate/generateThemes.js +0 -51
- package/dist/generate/generateThemes.js.map +0 -6
- package/dist/tamaguiConfigUtils.js +0 -87
- package/dist/tamaguiConfigUtils.js.map +0 -6
- package/dist/types.js +0 -17
- package/dist/types.js.map +0 -6
- package/types/generate/generateThemes.d.ts +0 -6
- package/types/generate/generateThemes.d.ts.map +0 -1
- package/types/generate-themes.d.ts.map +0 -1
- package/types/install-generated-package.d.ts.map +0 -1
- package/types/tamaguiConfigUtils.d.ts.map +0 -1
- package/types/types.d.ts.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/cli",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.42.1",
|
|
4
4
|
"source": "src/index.ts",
|
|
5
5
|
"types": "./types/index.d.ts",
|
|
6
6
|
"main": "dist",
|
|
@@ -27,12 +27,12 @@
|
|
|
27
27
|
"@callstack/repack-debugger-app": "^1.0.0",
|
|
28
28
|
"@fastify/sensible": "^4.1.0",
|
|
29
29
|
"@fastify/static": "^5.0.2",
|
|
30
|
-
"@tamagui/build": "1.
|
|
31
|
-
"@tamagui/create-theme": "1.
|
|
32
|
-
"@tamagui/generate-themes": "1.
|
|
33
|
-
"@tamagui/static": "1.
|
|
34
|
-
"@tamagui/types": "1.
|
|
35
|
-
"@tamagui/vite-plugin": "1.
|
|
30
|
+
"@tamagui/build": "1.42.1",
|
|
31
|
+
"@tamagui/create-theme": "1.42.1",
|
|
32
|
+
"@tamagui/generate-themes": "1.42.1",
|
|
33
|
+
"@tamagui/static": "1.42.1",
|
|
34
|
+
"@tamagui/types": "1.42.1",
|
|
35
|
+
"@tamagui/vite-plugin": "1.42.1",
|
|
36
36
|
"@types/compression": "^1.7.2",
|
|
37
37
|
"@types/morgan": "^1.9.3",
|
|
38
38
|
"@vitejs/plugin-react-swc": "^3.3.0",
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var generateThemes_exports = {};
|
|
30
|
-
__export(generateThemes_exports, {
|
|
31
|
-
cliGenerateThemes: () => cliGenerateThemes
|
|
32
|
-
});
|
|
33
|
-
module.exports = __toCommonJS(generateThemes_exports);
|
|
34
|
-
var import_path = require("path");
|
|
35
|
-
var import_generate_themes = require("@tamagui/generate-themes");
|
|
36
|
-
var fs = __toESM(require("fs-extra"));
|
|
37
|
-
async function cliGenerateThemes(options, { inPath, outPath }) {
|
|
38
|
-
const { generated, state } = await (0, import_generate_themes.generateThemes)(inPath);
|
|
39
|
-
await Promise.all([
|
|
40
|
-
fs.writeFile(outPath, generated),
|
|
41
|
-
state ? fs.writeFile(
|
|
42
|
-
(0, import_path.join)(options.paths.dotDir, `theme-builder.json`),
|
|
43
|
-
JSON.stringify(state)
|
|
44
|
-
) : null
|
|
45
|
-
]);
|
|
46
|
-
}
|
|
47
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
48
|
-
0 && (module.exports = {
|
|
49
|
-
cliGenerateThemes
|
|
50
|
-
});
|
|
51
|
-
//# sourceMappingURL=generateThemes.js.map
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/generate/generateThemes.ts"],
|
|
4
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAqB;AAErB,6BAA+B;AAE/B,SAAoB;AAEpB,eAAsB,kBACpB,SACA,EAAE,QAAQ,QAAQ,GAClB;AACA,QAAM,EAAE,WAAW,MAAM,IAAI,UAAM,uCAAe,MAAM;AAExD,QAAM,QAAQ,IAAI;AAAA,IAChB,GAAG,UAAU,SAAS,SAAS;AAAA,IAC/B,QACI,GAAG;AAAA,UACD,kBAAK,QAAQ,MAAM,QAAQ,oBAAoB;AAAA,MAC/C,KAAK,UAAU,KAAK;AAAA,IACtB,IACA;AAAA,EACN,CAAC;AACH;",
|
|
5
|
-
"names": []
|
|
6
|
-
}
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
"use strict";
|
|
3
|
-
var __create = Object.create;
|
|
4
|
-
var __defProp = Object.defineProperty;
|
|
5
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
8
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
-
var __export = (target, all) => {
|
|
10
|
-
for (var name in all)
|
|
11
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
12
|
-
};
|
|
13
|
-
var __copyProps = (to, from, except, desc) => {
|
|
14
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
-
for (let key of __getOwnPropNames(from))
|
|
16
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
17
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
18
|
-
}
|
|
19
|
-
return to;
|
|
20
|
-
};
|
|
21
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
22
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
23
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
24
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
25
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
26
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
27
|
-
mod
|
|
28
|
-
));
|
|
29
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
30
|
-
var tamaguiConfigUtils_exports = {};
|
|
31
|
-
__export(tamaguiConfigUtils_exports, {
|
|
32
|
-
generateTamaguiConfig: () => generateTamaguiConfig,
|
|
33
|
-
watchTamaguiConfig: () => watchTamaguiConfig
|
|
34
|
-
});
|
|
35
|
-
module.exports = __toCommonJS(tamaguiConfigUtils_exports);
|
|
36
|
-
var import_core_node = require("@tamagui/core-node");
|
|
37
|
-
var import_fs_extra = __toESM(require("fs-extra"));
|
|
38
|
-
var import_utils = require("./utils.js");
|
|
39
|
-
async function generateTamaguiConfig(options) {
|
|
40
|
-
await (0, import_fs_extra.ensureDir)(options.paths.dotDir);
|
|
41
|
-
const config = await getTamaguiConfig(options);
|
|
42
|
-
const { components, nameToPaths } = config;
|
|
43
|
-
const { themes, tokens } = config.tamaguiConfig;
|
|
44
|
-
for (const key in themes) {
|
|
45
|
-
const theme = themes[key];
|
|
46
|
-
theme.id = key;
|
|
47
|
-
for (const tkey in theme) {
|
|
48
|
-
theme[tkey] = (0, import_core_node.getVariableValue)(theme[tkey]);
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
for (const key in tokens) {
|
|
52
|
-
const token = tokens[key];
|
|
53
|
-
for (const tkey in token) {
|
|
54
|
-
token[tkey] = (0, import_core_node.getVariableValue)(token[tkey]);
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
for (const key in components) {
|
|
58
|
-
const component = components[key];
|
|
59
|
-
for (const _ in component.nameToInfo) {
|
|
60
|
-
delete component.nameToInfo[_].staticConfig["validStyles"];
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
for (const key in nameToPaths) {
|
|
64
|
-
nameToPaths[key] = [...nameToPaths[key]];
|
|
65
|
-
}
|
|
66
|
-
delete config.tamaguiConfig["Provider"];
|
|
67
|
-
delete config.tamaguiConfig["fontsParsed"];
|
|
68
|
-
delete config.tamaguiConfig["getCSS"];
|
|
69
|
-
delete config.tamaguiConfig["tokensParsed"];
|
|
70
|
-
delete config.tamaguiConfig["themeConfig"];
|
|
71
|
-
await import_fs_extra.default.writeJSON(options.paths.conf, config, {
|
|
72
|
-
spaces: 2
|
|
73
|
-
});
|
|
74
|
-
}
|
|
75
|
-
async function getTamaguiConfig(options) {
|
|
76
|
-
return (0, import_utils.loadTamagui)(options.tamaguiOptions);
|
|
77
|
-
}
|
|
78
|
-
async function watchTamaguiConfig(options) {
|
|
79
|
-
console.warn("\u274C disabling watch conf");
|
|
80
|
-
return;
|
|
81
|
-
}
|
|
82
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
83
|
-
0 && (module.exports = {
|
|
84
|
-
generateTamaguiConfig,
|
|
85
|
-
watchTamaguiConfig
|
|
86
|
-
});
|
|
87
|
-
//# sourceMappingURL=tamaguiConfigUtils.js.map
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/tamaguiConfigUtils.ts"],
|
|
4
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,uBAAiC;AAEjC,sBAA8B;AAG9B,mBAA4B;AAE5B,eAAsB,sBAAsB,SAA0B;AACpE,YAAM,2BAAU,QAAQ,MAAM,MAAM;AACpC,QAAM,SAAS,MAAM,iBAAiB,OAAO;AAC7C,QAAM,EAAE,YAAY,YAAY,IAAI;AACpC,QAAM,EAAE,QAAQ,OAAO,IAAI,OAAO;AAKlC,aAAW,OAAO,QAAQ;AACxB,UAAM,QAAQ,OAAO,GAAG;AAExB,UAAM,KAAK;AACX,eAAW,QAAQ,OAAO;AACxB,YAAM,IAAI,QAAI,mCAAiB,MAAM,IAAI,CAAC;AAAA,IAC5C;AAAA,EACF;AAGA,aAAW,OAAO,QAAQ;AACxB,UAAM,QAAQ,OAAO,GAAG;AACxB,eAAW,QAAQ,OAAO;AACxB,YAAM,IAAI,QAAI,mCAAiB,MAAM,IAAI,CAAC;AAAA,IAC5C;AAAA,EACF;AAGA,aAAW,OAAO,YAAY;AAC5B,UAAM,YAAY,WAAW,GAAG;AAChC,eAAW,KAAK,UAAU,YAAY;AACpC,aAAO,UAAU,WAAW,CAAC,EAAE,aAAa,aAAa;AAAA,IAC3D;AAAA,EACF;AAGA,aAAW,OAAO,aAAa;AAE7B,gBAAY,GAAG,IAAI,CAAC,GAAG,YAAY,GAAG,CAAC;AAAA,EACzC;AAIA,SAAO,OAAO,cAAc,UAAU;AAEtC,SAAO,OAAO,cAAc,aAAa;AAEzC,SAAO,OAAO,cAAc,QAAQ;AAEpC,SAAO,OAAO,cAAc,cAAc;AAE1C,SAAO,OAAO,cAAc,aAAa;AAEzC,QAAM,gBAAAA,QAAG,UAAU,QAAQ,MAAM,MAAM,QAAQ;AAAA,IAC7C,QAAQ;AAAA,EACV,CAAC;AACH;AAEA,eAAe,iBAAiB,SAA0B;AACxD,aAAO,0BAAY,QAAQ,cAAc;AAC3C;AAEA,eAAsB,mBAAmB,SAA0B;AACjE,UAAQ,KAAK,6BAAwB;AACrC;AAuBF;",
|
|
5
|
-
"names": ["fs"]
|
|
6
|
-
}
|
package/dist/types.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __copyProps = (to, from, except, desc) => {
|
|
7
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
-
for (let key of __getOwnPropNames(from))
|
|
9
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
-
}
|
|
12
|
-
return to;
|
|
13
|
-
};
|
|
14
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
-
var types_exports = {};
|
|
16
|
-
module.exports = __toCommonJS(types_exports);
|
|
17
|
-
//# sourceMappingURL=types.js.map
|
package/dist/types.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"generateThemes.d.ts","sourceRoot":"","sources":["../../src/generate/generateThemes.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAA;AAGnD,wBAAsB,iBAAiB,CACrC,OAAO,EAAE,kBAAkB,EAC3B,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,iBAazD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"generate-themes.d.ts","sourceRoot":"","sources":["../src/generate-themes.ts"],"names":[],"mappings":";AAKA,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAA;AAOnD,wBAAsB,cAAc,CAClC,OAAO,EAAE,kBAAkB,GAAG;IAC5B,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,EAAE,MAAM,CAAA;CAChB,iBA0CF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"install-generated-package.d.ts","sourceRoot":"","sources":["../src/install-generated-package.ts"],"names":[],"mappings":"AAcA,eAAO,MAAM,uBAAuB,SAAgB,MAAM,GAAG,MAAM,kBA6DlE,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tamaguiConfigUtils.d.ts","sourceRoot":"","sources":["../src/tamaguiConfigUtils.ts"],"names":[],"mappings":";AAMA,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAG5C,wBAAsB,qBAAqB,CAAC,OAAO,EAAE,eAAe,iBAuDnE;AAMD,wBAAsB,kBAAkB,CAAC,OAAO,EAAE,eAAe,iBAyBhE"}
|
package/types/types.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAEhD,MAAM,MAAM,WAAW,GAAG;IACxB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,cAAc,EAAE,OAAO,CAAC,cAAc,CAAC,CAAA;IACvC,KAAK,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;CAC5B,CAAA;AAED,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,aAAa,GAAG,YAAY,CAAA;IAClC,KAAK,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAA;IAC5B,YAAY,EAAE,MAAM,CAAA;IACpB,cAAc,EAAE,cAAc,CAAA;IAC9B,OAAO,EAAE;QACP,IAAI,CAAC,EAAE,MAAM,CAAA;QACb,IAAI,CAAC,EAAE,MAAM,CAAA;QACb,MAAM,CAAC,EAAE,MAAM,CAAA;QACf,MAAM,CAAC,EAAE,MAAM,CAAA;QACf,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAA;KACjD,CAAA;IACD,KAAK,EAAE;QACL,MAAM,EAAE,MAAM,CAAA;QACd,IAAI,EAAE,MAAM,CAAA;QACZ,KAAK,EAAE,MAAM,CAAA;KACd,CAAA;CACF,CAAA"}
|