@tamagui/static 1.135.3 → 1.135.4-1761749240853
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/check-dep-versions.mjs +268 -0
- package/dist/check-dep-versions.mjs.map +1 -0
- package/dist/checkDeps.mjs +33 -0
- package/dist/checkDeps.mjs.map +1 -0
- package/dist/constants.mjs +50 -0
- package/dist/constants.mjs.map +1 -0
- package/dist/exports.mjs +42 -0
- package/dist/exports.mjs.map +1 -0
- package/dist/extractor/accessSafe.mjs +47 -0
- package/dist/extractor/accessSafe.mjs.map +1 -0
- package/dist/extractor/babelParse.mjs +55 -0
- package/dist/extractor/babelParse.mjs.map +1 -0
- package/dist/extractor/bundle.mjs +149 -0
- package/dist/extractor/bundle.mjs.map +1 -0
- package/dist/extractor/bundleConfig.mjs +331 -0
- package/dist/extractor/bundleConfig.mjs.map +1 -0
- package/dist/extractor/concatClassName.mjs +79 -0
- package/dist/extractor/concatClassName.mjs.map +1 -0
- package/dist/extractor/createEvaluator.mjs +76 -0
- package/dist/extractor/createEvaluator.mjs.map +1 -0
- package/dist/extractor/createExtractor.mjs +976 -0
- package/dist/extractor/createExtractor.mjs.map +1 -0
- package/dist/extractor/createLogger.mjs +46 -0
- package/dist/extractor/createLogger.mjs.map +1 -0
- package/dist/extractor/errors.mjs +27 -0
- package/dist/extractor/errors.mjs.map +1 -0
- package/dist/extractor/esbuildAliasPlugin.mjs +45 -0
- package/dist/extractor/esbuildAliasPlugin.mjs.map +1 -0
- package/dist/extractor/esbuildTsconfigPaths.mjs +85 -0
- package/dist/extractor/esbuildTsconfigPaths.mjs.map +1 -0
- package/dist/extractor/evaluateAstNode.mjs +84 -0
- package/dist/extractor/evaluateAstNode.mjs.map +1 -0
- package/dist/extractor/extractHelpers.mjs +121 -0
- package/dist/extractor/extractHelpers.mjs.map +1 -0
- package/dist/extractor/extractMediaStyle.mjs +129 -0
- package/dist/extractor/extractMediaStyle.mjs.map +1 -0
- package/dist/extractor/extractToClassNames.mjs +304 -0
- package/dist/extractor/extractToClassNames.mjs.map +1 -0
- package/dist/extractor/extractToNative.mjs +262 -0
- package/dist/extractor/extractToNative.mjs.map +1 -0
- package/dist/extractor/findTopmostFunction.mjs +35 -0
- package/dist/extractor/findTopmostFunction.mjs.map +1 -0
- package/dist/extractor/{generatedUid.native.js → generatedUid.mjs} +26 -23
- package/dist/extractor/generatedUid.mjs.map +1 -0
- package/dist/extractor/getPrefixLogs.mjs +30 -0
- package/dist/extractor/getPrefixLogs.mjs.map +1 -0
- package/dist/extractor/getPropValueFromAttributes.mjs +68 -0
- package/dist/extractor/getPropValueFromAttributes.mjs.map +1 -0
- package/dist/extractor/getSourceModule.mjs +65 -0
- package/dist/extractor/getSourceModule.mjs.map +1 -0
- package/dist/extractor/getStaticBindingsForScope.mjs +149 -0
- package/dist/extractor/getStaticBindingsForScope.mjs.map +1 -0
- package/dist/extractor/getTamaguiConfigPathFromOptionsConfig.mjs +36 -0
- package/dist/extractor/getTamaguiConfigPathFromOptionsConfig.mjs.map +1 -0
- package/dist/extractor/literalToAst.mjs +85 -0
- package/dist/extractor/literalToAst.mjs.map +1 -0
- package/dist/extractor/loadFile.mjs +12 -0
- package/dist/extractor/loadFile.mjs.map +1 -0
- package/dist/extractor/loadTamagui.mjs +296 -0
- package/dist/extractor/loadTamagui.mjs.map +1 -0
- package/dist/extractor/logLines.mjs +36 -0
- package/dist/extractor/logLines.mjs.map +1 -0
- package/dist/extractor/{normalizeTernaries.native.js → normalizeTernaries.mjs} +45 -31
- package/dist/extractor/normalizeTernaries.mjs.map +1 -0
- package/dist/extractor/propsToFontFamilyCache.mjs +39 -0
- package/dist/extractor/propsToFontFamilyCache.mjs.map +1 -0
- package/dist/extractor/regenerateConfig.mjs +145 -0
- package/dist/extractor/regenerateConfig.mjs.map +1 -0
- package/dist/extractor/removeUnusedHooks.mjs +77 -0
- package/dist/extractor/removeUnusedHooks.mjs.map +1 -0
- package/dist/extractor/timer.mjs +44 -0
- package/dist/extractor/timer.mjs.map +1 -0
- package/dist/extractor/{validHTMLAttributes.native.js → validHTMLAttributes.mjs} +17 -16
- package/dist/extractor/validHTMLAttributes.mjs.map +1 -0
- package/dist/extractor/watchTamaguiConfig.mjs +59 -0
- package/dist/extractor/watchTamaguiConfig.mjs.map +1 -0
- package/dist/getPragmaOptions.mjs +55 -0
- package/dist/getPragmaOptions.mjs.map +1 -0
- package/dist/helpers/memoize.mjs +38 -0
- package/dist/helpers/memoize.mjs.map +1 -0
- package/dist/helpers/requireTamaguiCore.mjs +34 -0
- package/dist/helpers/requireTamaguiCore.mjs.map +1 -0
- package/dist/index.mjs +41 -0
- package/dist/index.mjs.map +1 -0
- package/dist/registerRequire.mjs +107 -0
- package/dist/registerRequire.mjs.map +1 -0
- package/dist/server.mjs +76 -0
- package/dist/server.mjs.map +1 -0
- package/dist/setup.mjs +2 -0
- package/dist/setup.mjs.map +1 -0
- package/dist/{types.native.js → types.mjs} +8 -6
- package/dist/types.mjs.map +1 -0
- package/package.json +19 -21
- package/dist/check-dep-versions.native.js +0 -602
- package/dist/check-dep-versions.native.js.map +0 -6
- package/dist/checkDeps.native.js +0 -34
- package/dist/checkDeps.native.js.map +0 -6
- package/dist/constants.native.js +0 -45
- package/dist/constants.native.js.map +0 -6
- package/dist/exports.native.js +0 -52
- package/dist/exports.native.js.map +0 -6
- package/dist/extractor/accessSafe.native.js +0 -48
- package/dist/extractor/accessSafe.native.js.map +0 -6
- package/dist/extractor/babelParse.native.js +0 -62
- package/dist/extractor/babelParse.native.js.map +0 -6
- package/dist/extractor/bundle.native.js +0 -168
- package/dist/extractor/bundle.native.js.map +0 -6
- package/dist/extractor/bundleConfig.native.js +0 -394
- package/dist/extractor/bundleConfig.native.js.map +0 -6
- package/dist/extractor/concatClassName.native.js +0 -69
- package/dist/extractor/concatClassName.native.js.map +0 -6
- package/dist/extractor/createEvaluator.native.js +0 -63
- package/dist/extractor/createEvaluator.native.js.map +0 -6
- package/dist/extractor/createExtractor.native.js +0 -1229
- package/dist/extractor/createExtractor.native.js.map +0 -6
- package/dist/extractor/createLogger.native.js +0 -35
- package/dist/extractor/createLogger.native.js.map +0 -6
- package/dist/extractor/errors.native.js +0 -119
- package/dist/extractor/errors.native.js.map +0 -6
- package/dist/extractor/esbuildAliasPlugin.native.js +0 -52
- package/dist/extractor/esbuildAliasPlugin.native.js.map +0 -6
- package/dist/extractor/esbuildTsconfigPaths.native.js +0 -79
- package/dist/extractor/esbuildTsconfigPaths.native.js.map +0 -6
- package/dist/extractor/evaluateAstNode.native.js +0 -98
- package/dist/extractor/evaluateAstNode.native.js.map +0 -6
- package/dist/extractor/extractHelpers.native.js +0 -183
- package/dist/extractor/extractHelpers.native.js.map +0 -6
- package/dist/extractor/extractMediaStyle.native.js +0 -138
- package/dist/extractor/extractMediaStyle.native.js.map +0 -6
- package/dist/extractor/extractToClassNames.native.js +0 -332
- package/dist/extractor/extractToClassNames.native.js.map +0 -6
- package/dist/extractor/extractToNative.native.js +0 -276
- package/dist/extractor/extractToNative.native.js.map +0 -6
- package/dist/extractor/findTopmostFunction.native.js +0 -37
- package/dist/extractor/findTopmostFunction.native.js.map +0 -6
- package/dist/extractor/generatedUid.native.js.map +0 -6
- package/dist/extractor/getPrefixLogs.native.js +0 -30
- package/dist/extractor/getPrefixLogs.native.js.map +0 -6
- package/dist/extractor/getPropValueFromAttributes.native.js +0 -68
- package/dist/extractor/getPropValueFromAttributes.native.js.map +0 -6
- package/dist/extractor/getSourceModule.native.js +0 -80
- package/dist/extractor/getSourceModule.native.js.map +0 -6
- package/dist/extractor/getStaticBindingsForScope.native.js +0 -183
- package/dist/extractor/getStaticBindingsForScope.native.js.map +0 -6
- package/dist/extractor/getTamaguiConfigPathFromOptionsConfig.native.js +0 -37
- package/dist/extractor/getTamaguiConfigPathFromOptionsConfig.native.js.map +0 -6
- package/dist/extractor/literalToAst.native.js +0 -106
- package/dist/extractor/literalToAst.native.js.map +0 -6
- package/dist/extractor/loadFile.native.js +0 -21
- package/dist/extractor/loadFile.native.js.map +0 -6
- package/dist/extractor/loadTamagui.native.js +0 -314
- package/dist/extractor/loadTamagui.native.js.map +0 -6
- package/dist/extractor/logLines.native.js +0 -53
- package/dist/extractor/logLines.native.js.map +0 -6
- package/dist/extractor/normalizeTernaries.native.js.map +0 -6
- package/dist/extractor/propsToFontFamilyCache.native.js +0 -40
- package/dist/extractor/propsToFontFamilyCache.native.js.map +0 -6
- package/dist/extractor/regenerateConfig.native.js +0 -148
- package/dist/extractor/regenerateConfig.native.js.map +0 -6
- package/dist/extractor/removeUnusedHooks.native.js +0 -111
- package/dist/extractor/removeUnusedHooks.native.js.map +0 -6
- package/dist/extractor/timer.native.js +0 -44
- package/dist/extractor/timer.native.js.map +0 -6
- package/dist/extractor/validHTMLAttributes.native.js.map +0 -6
- package/dist/extractor/watchTamaguiConfig.native.js +0 -60
- package/dist/extractor/watchTamaguiConfig.native.js.map +0 -6
- package/dist/getPragmaOptions.native.js +0 -62
- package/dist/getPragmaOptions.native.js.map +0 -6
- package/dist/helpers/memoize.native.js +0 -40
- package/dist/helpers/memoize.native.js.map +0 -6
- package/dist/helpers/requireTamaguiCore.native.js +0 -34
- package/dist/helpers/requireTamaguiCore.native.js.map +0 -6
- package/dist/index.native.js +0 -35
- package/dist/index.native.js.map +0 -6
- package/dist/registerRequire.native.js +0 -124
- package/dist/registerRequire.native.js.map +0 -6
- package/dist/server.native.js +0 -70
- package/dist/server.native.js.map +0 -6
- package/dist/setup.native.js +0 -2
- package/dist/setup.native.js.map +0 -6
- package/dist/types.native.js.map +0 -6
|
@@ -0,0 +1,268 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all) __defProp(target, name, {
|
|
7
|
+
get: all[name],
|
|
8
|
+
enumerable: !0
|
|
9
|
+
});
|
|
10
|
+
},
|
|
11
|
+
__copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
|
|
13
|
+
get: () => from[key],
|
|
14
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
15
|
+
});
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
19
|
+
value: !0
|
|
20
|
+
}), mod);
|
|
21
|
+
var check_dep_versions_exports = {};
|
|
22
|
+
__export(check_dep_versions_exports, {
|
|
23
|
+
CDVC: () => CDVC
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(check_dep_versions_exports);
|
|
26
|
+
var import_fast_glob = require("fast-glob"),
|
|
27
|
+
import_js_yaml = require("js-yaml"),
|
|
28
|
+
import_node_fs = require("node:fs"),
|
|
29
|
+
import_node_path = require("node:path");
|
|
30
|
+
function calculateVersionsForEachDependency(packages, depType = DEFAULT_DEP_TYPES) {
|
|
31
|
+
const dependenciesToVersionsSeen = /* @__PURE__ */new Map();
|
|
32
|
+
for (const package_ of packages) recordDependencyVersionsForPackageJson(dependenciesToVersionsSeen, package_, depType);
|
|
33
|
+
return dependenciesToVersionsSeen;
|
|
34
|
+
}
|
|
35
|
+
function recordDependencyVersionsForPackageJson(dependenciesToVersionsSeen, package_, depType) {
|
|
36
|
+
if (package_.packageJson.name && package_.packageJson.version && recordDependencyVersion(dependenciesToVersionsSeen, package_.packageJson.name, package_.packageJson.version, package_, !0), depType.includes("dependencies" /* dependencies */) && package_.packageJson.dependencies) for (const [dependency, dependencyVersion] of Object.entries(package_.packageJson.dependencies)) dependencyVersion && recordDependencyVersion(dependenciesToVersionsSeen, dependency, dependencyVersion, package_);
|
|
37
|
+
if (depType.includes("devDependencies" /* devDependencies */) && package_.packageJson.devDependencies) for (const [dependency, dependencyVersion] of Object.entries(package_.packageJson.devDependencies)) dependencyVersion && recordDependencyVersion(dependenciesToVersionsSeen, dependency, dependencyVersion, package_);
|
|
38
|
+
if (depType.includes("optionalDependencies" /* optionalDependencies */) && package_.packageJson.optionalDependencies) for (const [dependency, dependencyVersion] of Object.entries(package_.packageJson.optionalDependencies)) dependencyVersion && recordDependencyVersion(dependenciesToVersionsSeen, dependency, dependencyVersion, package_);
|
|
39
|
+
if (depType.includes("peerDependencies" /* peerDependencies */) && package_.packageJson.peerDependencies) for (const [dependency, dependencyVersion] of Object.entries(package_.packageJson.peerDependencies)) dependencyVersion && recordDependencyVersion(dependenciesToVersionsSeen, dependency, dependencyVersion, package_);
|
|
40
|
+
if (depType.includes("resolutions" /* resolutions */) && package_.packageJson.resolutions) for (const [dependency, dependencyVersion] of Object.entries(package_.packageJson.resolutions)) dependencyVersion && recordDependencyVersion(dependenciesToVersionsSeen, dependency, dependencyVersion, package_);
|
|
41
|
+
}
|
|
42
|
+
function recordDependencyVersion(dependenciesToVersionsSeen, dependency, version, package_, isLocalPackageVersion = !1) {
|
|
43
|
+
dependenciesToVersionsSeen.has(dependency) || dependenciesToVersionsSeen.set(dependency, []);
|
|
44
|
+
const list = dependenciesToVersionsSeen.get(dependency);
|
|
45
|
+
list && list.push({
|
|
46
|
+
package: package_,
|
|
47
|
+
version,
|
|
48
|
+
isLocalPackageVersion
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
function calculateDependenciesAndVersions(dependencyVersions) {
|
|
52
|
+
return [...dependencyVersions.entries()].sort((a, b) => a[0].localeCompare(b[0])).flatMap(([dependency, versionObjectsForDep]) => {
|
|
53
|
+
if (!versionObjectsForDep) return [];
|
|
54
|
+
let versions = versionObjectsForDep.filter(versionObject => !versionObject.isLocalPackageVersion).map(versionObject => versionObject.version);
|
|
55
|
+
const localPackageVersions = versionObjectsForDep.filter(versionObject => versionObject.isLocalPackageVersion).map(versionObject => versionObject.version),
|
|
56
|
+
allVersionsHaveWorkspacePrefix = versions.every(version => version.startsWith("workspace:")),
|
|
57
|
+
hasIncompatibilityWithLocalPackageVersion = versions.some(version => localPackageVersions[0] !== version);
|
|
58
|
+
localPackageVersions.length === 1 && !allVersionsHaveWorkspacePrefix && hasIncompatibilityWithLocalPackageVersion && (versions = [...versions, ...localPackageVersions]);
|
|
59
|
+
const uniqueVersions = [...new Set(versions)],
|
|
60
|
+
uniqueVersionsWithInfo = versionsObjectsWithSortedPackages(uniqueVersions, versionObjectsForDep);
|
|
61
|
+
return {
|
|
62
|
+
dependency,
|
|
63
|
+
versions: uniqueVersionsWithInfo
|
|
64
|
+
};
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
function versionsObjectsWithSortedPackages(versions, versionObjects) {
|
|
68
|
+
return versions.map(version => {
|
|
69
|
+
const matchingVersionObjects = versionObjects.filter(versionObject => versionObject.version === version);
|
|
70
|
+
return {
|
|
71
|
+
version,
|
|
72
|
+
packages: matchingVersionObjects.map(object => object.package).sort((a, b) => Package.comparator(a, b))
|
|
73
|
+
};
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
const HARDCODED_IGNORED_DEPENDENCIES = /* @__PURE__ */new Set(["//"
|
|
77
|
+
// May be used to add comments to package.json files.
|
|
78
|
+
]);
|
|
79
|
+
function filterOutIgnoredDependencies(mismatchingVersions, ignoredDependencies, includedDependencyPatterns) {
|
|
80
|
+
for (const ignoreDependency of ignoredDependencies) if (!mismatchingVersions.some(mismatchingVersion => mismatchingVersion.dependency === ignoreDependency)) throw new Error(`Specified option '--ignore-dep ${ignoreDependency}', but no version mismatches detected for this dependency.`);
|
|
81
|
+
return ignoredDependencies.length > 0 || includedDependencyPatterns.length > 0 || mismatchingVersions.some(mismatchingVersion => HARDCODED_IGNORED_DEPENDENCIES.has(mismatchingVersion.dependency)) ? mismatchingVersions.filter(mismatchingVersion => !ignoredDependencies.includes(mismatchingVersion.dependency) && includedDependencyPatterns.some(ignoreDependencyPattern => mismatchingVersion.dependency.match(ignoreDependencyPattern)) && !HARDCODED_IGNORED_DEPENDENCIES.has(mismatchingVersion.dependency)) : mismatchingVersions;
|
|
82
|
+
}
|
|
83
|
+
function getPackages(root, ignorePackages, ignorePackagePatterns, ignorePaths, ignorePathPatterns) {
|
|
84
|
+
if (!Package.exists(root)) throw new Error("No package.json found at provided path.");
|
|
85
|
+
const packages = accumulatePackages(root, ["."]);
|
|
86
|
+
for (const ignoredPackage of ignorePackages) if (!Package.some(packages, package_ => package_.name === ignoredPackage)) throw new Error(`Specified option '--ignore-package ${ignoredPackage}', but no such package detected in workspace.`);
|
|
87
|
+
for (const ignoredPackagePattern of ignorePackagePatterns) if (
|
|
88
|
+
// eslint-disable-next-line unicorn/no-array-method-this-argument,unicorn/no-array-callback-reference -- false positive
|
|
89
|
+
!Package.some(packages, package_ => ignoredPackagePattern.test(package_.name))) throw new Error(`Specified option '--ignore-package-pattern ${String(ignoredPackagePattern)}', but no matching packages detected in workspace.`);
|
|
90
|
+
for (const ignoredPath of ignorePaths) if (
|
|
91
|
+
// eslint-disable-next-line unicorn/no-array-method-this-argument,unicorn/no-array-callback-reference -- false positive
|
|
92
|
+
!Package.some(packages, package_ => package_.pathRelative.includes(ignoredPath))) throw new Error(`Specified option '--ignore-path ${ignoredPath}', but no matching paths detected in workspace.`);
|
|
93
|
+
for (const ignoredPathPattern of ignorePathPatterns) if (
|
|
94
|
+
// eslint-disable-next-line unicorn/no-array-method-this-argument,unicorn/no-array-callback-reference -- false positive
|
|
95
|
+
!Package.some(packages, package_ => ignoredPathPattern.test(package_.pathRelative))) throw new Error(`Specified option '--ignore-path-pattern ${String(ignoredPathPattern)}', but no matching paths detected in workspace.`);
|
|
96
|
+
return ignorePackages.length > 0 || ignorePackagePatterns.length > 0 || ignorePaths.length > 0 || ignorePathPatterns.length > 0 ? packages.filter(package_ => !ignorePackages.includes(package_.name) && !ignorePackagePatterns.some(ignorePackagePattern => package_.name.match(ignorePackagePattern)) && !ignorePaths.some(ignorePath => package_.pathRelative.includes(ignorePath)) && !ignorePathPatterns.some(ignorePathPattern => package_.pathRelative.match(ignorePathPattern))) : packages;
|
|
97
|
+
}
|
|
98
|
+
function expandWorkspaces(root, workspacePatterns) {
|
|
99
|
+
return workspacePatterns.flatMap(workspace => workspace.includes("*") ? (0, import_fast_glob.globSync)(workspace, {
|
|
100
|
+
onlyDirectories: !0,
|
|
101
|
+
cwd: root,
|
|
102
|
+
ignore: ["**/node_modules"]
|
|
103
|
+
}) : [workspace]);
|
|
104
|
+
}
|
|
105
|
+
function accumulatePackages(root, paths) {
|
|
106
|
+
const results = [];
|
|
107
|
+
for (const relativePath of paths) {
|
|
108
|
+
const path = (0, import_node_path.join)(root, relativePath);
|
|
109
|
+
if (Package.exists(path)) {
|
|
110
|
+
const package_ = new Package(path, root);
|
|
111
|
+
results.push(
|
|
112
|
+
// Add the current package.
|
|
113
|
+
package_, ...accumulatePackages(path, expandWorkspaces(path, package_.workspacePatterns)));
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
return results;
|
|
117
|
+
}
|
|
118
|
+
class Package {
|
|
119
|
+
/** Absolute path to package */
|
|
120
|
+
path;
|
|
121
|
+
/** Absolute path to workspace.*/
|
|
122
|
+
pathWorkspace;
|
|
123
|
+
/** Absolute path to package.json. */
|
|
124
|
+
pathPackageJson;
|
|
125
|
+
packageJson;
|
|
126
|
+
packageJsonEndsInNewline;
|
|
127
|
+
pnpmWorkspacePackages;
|
|
128
|
+
constructor(path, pathWorkspace) {
|
|
129
|
+
this.path = path, this.pathWorkspace = pathWorkspace, this.pathPackageJson = (0, import_node_path.join)(path, "package.json");
|
|
130
|
+
const packageJsonContents = (0, import_node_fs.readFileSync)(this.pathPackageJson, "utf8");
|
|
131
|
+
this.packageJsonEndsInNewline = packageJsonContents.endsWith(`
|
|
132
|
+
`), this.packageJson = JSON.parse(packageJsonContents);
|
|
133
|
+
const pnpmWorkspacePath = (0, import_node_path.join)(path, "pnpm-workspace.yaml");
|
|
134
|
+
if ((0, import_node_fs.existsSync)(pnpmWorkspacePath)) {
|
|
135
|
+
const pnpmWorkspaceContents = (0, import_node_fs.readFileSync)(pnpmWorkspacePath, "utf8"),
|
|
136
|
+
pnpmWorkspaceYaml = (0, import_js_yaml.load)(pnpmWorkspaceContents);
|
|
137
|
+
this.pnpmWorkspacePackages = pnpmWorkspaceYaml.packages;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
get name() {
|
|
141
|
+
if (this.workspacePatterns.length > 0 && !this.packageJson.name) return "(Root)";
|
|
142
|
+
if (!this.packageJson.name) throw new Error(`${this.pathPackageJson} missing \`name\``);
|
|
143
|
+
return this.packageJson.name;
|
|
144
|
+
}
|
|
145
|
+
/** Relative to workspace root. */
|
|
146
|
+
get pathRelative() {
|
|
147
|
+
return (0, import_node_path.relative)(this.pathWorkspace, this.path);
|
|
148
|
+
}
|
|
149
|
+
get workspacePatterns() {
|
|
150
|
+
if (this.packageJson.workspaces) {
|
|
151
|
+
if (Array.isArray(this.packageJson.workspaces)) return this.packageJson.workspaces;
|
|
152
|
+
if (this.packageJson.workspaces.packages) {
|
|
153
|
+
if (!Array.isArray(this.packageJson.workspaces.packages)) throw new TypeError("package.json `workspaces.packages` is not a string array.");
|
|
154
|
+
return this.packageJson.workspaces.packages;
|
|
155
|
+
} else throw new TypeError("package.json `workspaces` is not a string array.");
|
|
156
|
+
}
|
|
157
|
+
if (this.pnpmWorkspacePackages) {
|
|
158
|
+
if (!Array.isArray(this.pnpmWorkspacePackages)) throw new TypeError("pnpm-workspace.yaml `packages` is not a string array.");
|
|
159
|
+
return this.pnpmWorkspacePackages;
|
|
160
|
+
}
|
|
161
|
+
return [];
|
|
162
|
+
}
|
|
163
|
+
static exists(path) {
|
|
164
|
+
const packageJsonPath = (0, import_node_path.join)(path, "package.json");
|
|
165
|
+
return (0, import_node_fs.existsSync)(packageJsonPath);
|
|
166
|
+
}
|
|
167
|
+
static some(packages, callback) {
|
|
168
|
+
return packages.some(package_ => callback(package_));
|
|
169
|
+
}
|
|
170
|
+
static comparator(package1, package2) {
|
|
171
|
+
return package1.name.localeCompare(package2.name);
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
var DEPENDENCY_TYPE = /* @__PURE__ */(DEPENDENCY_TYPE2 => (DEPENDENCY_TYPE2.dependencies = "dependencies", DEPENDENCY_TYPE2.devDependencies = "devDependencies", DEPENDENCY_TYPE2.optionalDependencies = "optionalDependencies", DEPENDENCY_TYPE2.peerDependencies = "peerDependencies", DEPENDENCY_TYPE2.resolutions = "resolutions", DEPENDENCY_TYPE2))(DEPENDENCY_TYPE || {});
|
|
175
|
+
const DEFAULT_DEP_TYPES = ["dependencies" /* dependencies */, "devDependencies" /* devDependencies */, "optionalDependencies" /* optionalDependencies */, "resolutions" /* resolutions */
|
|
176
|
+
// peerDependencies is not included by default, see discussion in: https://github.com/bmish/check-dependency-version-consistency/issues/402
|
|
177
|
+
];
|
|
178
|
+
function check(path) {
|
|
179
|
+
const options = {
|
|
180
|
+
includeDepPattern: ["tamagui", "react-native-web-lite", "react-native-web-internals"]
|
|
181
|
+
};
|
|
182
|
+
if (options && options.depType && options.depType.some(dt => !Object.keys(DEPENDENCY_TYPE).includes(dt))) throw new Error(`Invalid depType provided. Choices are: ${Object.keys(DEPENDENCY_TYPE).join(", ")}.`);
|
|
183
|
+
const optionsWithDefaults = {
|
|
184
|
+
fix: !1,
|
|
185
|
+
ignoreDep: [],
|
|
186
|
+
includeDepPattern: [],
|
|
187
|
+
ignorePackage: [],
|
|
188
|
+
ignorePackagePattern: [],
|
|
189
|
+
ignorePath: [],
|
|
190
|
+
ignorePathPattern: [],
|
|
191
|
+
...options,
|
|
192
|
+
// Fallback to default if no depType(s) provided.
|
|
193
|
+
depType: options && options.depType && options.depType.length > 0 ? options.depType : DEFAULT_DEP_TYPES
|
|
194
|
+
},
|
|
195
|
+
packages = getPackages(path, optionsWithDefaults.ignorePackage, optionsWithDefaults.ignorePackagePattern.map(s => new RegExp(s)), optionsWithDefaults.ignorePath, optionsWithDefaults.ignorePathPattern.map(s => new RegExp(s))),
|
|
196
|
+
dependencies = calculateVersionsForEachDependency(packages, optionsWithDefaults.depType.map(dt => DEPENDENCY_TYPE[dt])
|
|
197
|
+
// Convert string to enum.
|
|
198
|
+
),
|
|
199
|
+
dependenciesAndVersions = calculateDependenciesAndVersions(dependencies),
|
|
200
|
+
dependenciesAndVersionsWithMismatches = dependenciesAndVersions.filter(({
|
|
201
|
+
versions
|
|
202
|
+
}) => versions.length > 1),
|
|
203
|
+
dependenciesAndVersionsWithoutIgnored = filterOutIgnoredDependencies(dependenciesAndVersions, optionsWithDefaults.ignoreDep, optionsWithDefaults.includeDepPattern.map(s => new RegExp(s))),
|
|
204
|
+
dependenciesAndVersionsMismatchesWithoutIgnored = filterOutIgnoredDependencies(dependenciesAndVersionsWithMismatches, optionsWithDefaults.ignoreDep, optionsWithDefaults.includeDepPattern.map(s => new RegExp(s)));
|
|
205
|
+
return {
|
|
206
|
+
// Information about all dependencies.
|
|
207
|
+
dependencies: Object.fromEntries(dependenciesAndVersionsWithoutIgnored.map(({
|
|
208
|
+
dependency,
|
|
209
|
+
versions
|
|
210
|
+
}) => [dependency, {
|
|
211
|
+
isMismatching: dependenciesAndVersionsMismatchesWithoutIgnored.some(dep => dep.dependency === dependency),
|
|
212
|
+
versions
|
|
213
|
+
}]))
|
|
214
|
+
};
|
|
215
|
+
}
|
|
216
|
+
class CDVC {
|
|
217
|
+
/** An object mapping each dependency in the workspace to information including the versions found of it. */
|
|
218
|
+
dependencies;
|
|
219
|
+
/**
|
|
220
|
+
* @param path - path to the workspace root
|
|
221
|
+
* @param options
|
|
222
|
+
* @param options.fix - Whether to autofix inconsistencies (using latest version present)
|
|
223
|
+
* @param options.ignoreDep - Dependency(s) to ignore mismatches for
|
|
224
|
+
* @param options.includeDepPattern - RegExp(s) of dependency names to ignore mismatches for
|
|
225
|
+
* @param options.ignorePackage - Workspace package(s) to ignore mismatches for
|
|
226
|
+
* @param options.ignorePackagePattern - RegExp(s) of package names to ignore mismatches for
|
|
227
|
+
* @param options.ignorePath - Workspace-relative path(s) of packages to ignore mismatches for
|
|
228
|
+
* @param options.ignorePathPattern - RegExp(s) of workspace-relative path of packages to ignore mismatches for
|
|
229
|
+
*/
|
|
230
|
+
constructor(path) {
|
|
231
|
+
const {
|
|
232
|
+
dependencies
|
|
233
|
+
} = check(path);
|
|
234
|
+
this.dependencies = dependencies;
|
|
235
|
+
}
|
|
236
|
+
toMismatchSummary() {
|
|
237
|
+
return dependenciesToMismatchSummary(this.dependencies);
|
|
238
|
+
}
|
|
239
|
+
getDependencies() {
|
|
240
|
+
return Object.keys(this.dependencies).map(dependency => this.getDependency(dependency));
|
|
241
|
+
}
|
|
242
|
+
getDependency(name) {
|
|
243
|
+
return {
|
|
244
|
+
name,
|
|
245
|
+
isMismatching: this.dependencies[name].isMismatching,
|
|
246
|
+
versions: this.dependencies[name].versions.map(version => ({
|
|
247
|
+
version: version.version,
|
|
248
|
+
packages: version.packages.map(package_ => ({
|
|
249
|
+
pathRelative: package_.pathRelative
|
|
250
|
+
}))
|
|
251
|
+
}))
|
|
252
|
+
};
|
|
253
|
+
}
|
|
254
|
+
get hasMismatchingDependencies() {
|
|
255
|
+
return Object.values(this.dependencies).some(dep => dep.isMismatching);
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
function dependenciesToMismatchSummary(dependencies) {
|
|
259
|
+
const mismatchingDependencyVersions = Object.entries(dependencies).filter(([, value]) => value.isMismatching).map(([dependency, value]) => ({
|
|
260
|
+
dependency,
|
|
261
|
+
versions: value.versions
|
|
262
|
+
}));
|
|
263
|
+
if (mismatchingDependencyVersions.length === 0) return "";
|
|
264
|
+
const tables = mismatchingDependencyVersions.map(object => `${object.dependency} - ${object.versions.map(v => `${v.version}`).join(", ")}`).join("");
|
|
265
|
+
return [`Found ${mismatchingDependencyVersions.length} ${mismatchingDependencyVersions.length === 1 ? "dependency" : "dependencies"} with mismatching versions across the workspace.`, tables].join(`
|
|
266
|
+
`);
|
|
267
|
+
}
|
|
268
|
+
//# sourceMappingURL=check-dep-versions.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["check_dep_versions_exports","__export","CDVC","module","exports","__toCommonJS","import_fast_glob","require","import_js_yaml","import_node_fs","import_node_path","calculateVersionsForEachDependency","packages","depType","DEFAULT_DEP_TYPES","dependenciesToVersionsSeen","Map","package_","recordDependencyVersionsForPackageJson","packageJson","name","version","recordDependencyVersion","includes","dependencies","dependency","dependencyVersion","Object","entries","devDependencies","optionalDependencies","peerDependencies","resolutions","isLocalPackageVersion","has","set","list","get","push","package","calculateDependenciesAndVersions","dependencyVersions","sort","a","b","localeCompare","flatMap","versionObjectsForDep","versions","filter","versionObject","map","localPackageVersions","allVersionsHaveWorkspacePrefix","every","startsWith","hasIncompatibilityWithLocalPackageVersion","some","length","uniqueVersions","Set","uniqueVersionsWithInfo","versionsObjectsWithSortedPackages","versionObjects","matchingVersionObjects","object","Package","comparator","HARDCODED_IGNORED_DEPENDENCIES","filterOutIgnoredDependencies","mismatchingVersions","ignoredDependencies","includedDependencyPatterns","ignoreDependency","mismatchingVersion","Error","ignoreDependencyPattern","match","getPackages","root","ignorePackages","ignorePackagePatterns","ignorePaths","ignorePathPatterns","exists","accumulatePackages","ignoredPackage","ignoredPackagePattern","test","String","ignoredPath","pathRelative","ignoredPathPattern","ignorePackagePattern","ignorePath","ignorePathPattern","expandWorkspaces","workspacePatterns","workspace","globSync","onlyDirectories","cwd","ignore","paths","results","relativePath","path","join","pathWorkspace","pathPackageJson","packageJsonEndsInNewline","pnpmWorkspacePackages","constructor","packageJsonContents","readFileSync","endsWith","JSON","parse","pnpmWorkspacePath","existsSync","pnpmWorkspaceContents","pnpmWorkspaceYaml","load","relative","workspaces","Array","isArray","TypeError","packageJsonPath","callback","package1","package2","DEPENDENCY_TYPE","DEPENDENCY_TYPE2","check","options","includeDepPattern","dt","keys","optionsWithDefaults","fix","ignoreDep","ignorePackage","s","RegExp","dependenciesAndVersions","dependenciesAndVersionsWithMismatches","dependenciesAndVersionsWithoutIgnored","dependenciesAndVersionsMismatchesWithoutIgnored","fromEntries","isMismatching","dep","toMismatchSummary","dependenciesToMismatchSummary","getDependencies","getDependency","hasMismatchingDependencies","values","mismatchingDependencyVersions","value","tables","v"],"sources":["../src/check-dep-versions.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,0BAAA;AAAAC,QAAA,CAAAD,0BAAA;EAAAE,IAAA,EAAAA,CAAA,KAAAA;AAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAC,YAAA,CAAAL,0BAAA;AAKA,IAAAM,gBAAA,GAAyBC,OAAA;EACzBC,cAAA,GAAqBD,OAAA;EACrBE,cAAA,GAAyCF,OAAA;EACzCG,gBAAA,GAA+BH,OAAA;AA+C/B,SAASI,mCACPC,QAAA,EACAC,OAAA,GAAsCC,iBAAA,EACV;EAC5B,MAAMC,0BAAA,GAAyD,mBAAIC,GAAA,CAGjE;EACF,WAAWC,QAAA,IAAYL,QAAA,EACrBM,sCAAA,CAAuCH,0BAAA,EAA4BE,QAAA,EAAUJ,OAAO;EAEtF,OAAOE,0BAAA;AACT;AAGA,SAASG,uCACPH,0BAAA,EACAE,QAAA,EACAJ,OAAA,EACA;EAWA,IAVII,QAAA,CAASE,WAAA,CAAYC,IAAA,IAAQH,QAAA,CAASE,WAAA,CAAYE,OAAA,IACpDC,uBAAA,CACEP,0BAAA,EACAE,QAAA,CAASE,WAAA,CAAYC,IAAA,EACrBH,QAAA,CAASE,WAAA,CAAYE,OAAA,EACrBJ,QAAA,EACA,EACF,GAIAJ,OAAA,CAAQU,QAAA,CAAS,iCAA4B,KAC7CN,QAAA,CAASE,WAAA,CAAYK,YAAA,EAErB,WAAW,CAACC,UAAA,EAAYC,iBAAiB,KAAKC,MAAA,CAAOC,OAAA,CACnDX,QAAA,CAASE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AAA,IAAQA,GAAA,CAAID,aAAa;EACzE;AACF;AAEA,SAASG,8BAA8BjI,YAAA,EAAoC;EACzE,MAAMsI,6BAAA,GAAgCnI,MAAA,CAAOC,OAAA,CAAQJ,YAAY,EAC9DyB,MAAA,CAAO,CAAC,GAAG8G,KAAK,MAAMA,KAAA,CAAMT,aAAa,EACzCnG,GAAA,CAAI,CAAC,CAAC1B,UAAA,EAAYsI,KAAK,OAAO;IAAEtI,UAAA;IAAYuB,QAAA,EAAU+G,KAAA,CAAM/G;EAAS,EAAE;EAE1E,IAAI8G,6BAAA,CAA8BpG,MAAA,KAAW,GAC3C,OAAO;EAGT,MAAMsG,MAAA,GAASF,6BAAA,CACZ3G,GAAA,CAAKc,MAAA,IACG,GAAGA,MAAA,CAAOxC,UAAU,MAAMwC,MAAA,CAAOjB,QAAA,CAASG,GAAA,CAAK8G,CAAA,IAAM,GAAGA,CAAA,CAAE5I,OAAO,EAAE,EAAEsF,IAAA,CAAK,IAAI,CAAC,EACvF,EACAA,IAAA,CAAK,EAAE;EAEV,OAAO,CACL,SAASmD,6BAAA,CAA8BpG,MAAM,IAC3CoG,6BAAA,CAA8BpG,MAAA,KAAW,IAAI,eAAe,cAC9D,oDACAsG,MAAA,CACF,CAAErD,IAAA,CAAK;AAAA,CAAI;AACb","ignoreList":[]}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all) __defProp(target, name, {
|
|
7
|
+
get: all[name],
|
|
8
|
+
enumerable: !0
|
|
9
|
+
});
|
|
10
|
+
},
|
|
11
|
+
__copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
|
|
13
|
+
get: () => from[key],
|
|
14
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
15
|
+
});
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
19
|
+
value: !0
|
|
20
|
+
}), mod);
|
|
21
|
+
var checkDeps_exports = {};
|
|
22
|
+
__export(checkDeps_exports, {
|
|
23
|
+
DEPENDENCY_TYPE: () => DEPENDENCY_TYPE,
|
|
24
|
+
checkDeps: () => checkDeps
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(checkDeps_exports);
|
|
27
|
+
var import_check_dep_versions = require("./check-dep-versions.mjs"),
|
|
28
|
+
DEPENDENCY_TYPE = /* @__PURE__ */(DEPENDENCY_TYPE2 => (DEPENDENCY_TYPE2.dependencies = "dependencies", DEPENDENCY_TYPE2.devDependencies = "devDependencies", DEPENDENCY_TYPE2.optionalDependencies = "optionalDependencies", DEPENDENCY_TYPE2.peerDependencies = "peerDependencies", DEPENDENCY_TYPE2.resolutions = "resolutions", DEPENDENCY_TYPE2))(DEPENDENCY_TYPE || {});
|
|
29
|
+
async function checkDeps(root) {
|
|
30
|
+
const summary = new import_check_dep_versions.CDVC(root).toMismatchSummary();
|
|
31
|
+
summary || (console.info("Tamagui dependencies look good \u2705"), process.exit(0)), console.error(summary), process.exit(1);
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=checkDeps.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["checkDeps_exports","__export","DEPENDENCY_TYPE","checkDeps","module","exports","__toCommonJS","import_check_dep_versions","require","DEPENDENCY_TYPE2","dependencies","devDependencies","optionalDependencies","peerDependencies","resolutions","root","summary","CDVC","toMismatchSummary","console","info","process","exit","error"],"sources":["../src/checkDeps.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,iBAAA;AAAAC,QAAA,CAAAD,iBAAA;EAAAE,eAAA,EAAAA,CAAA,KAAAA,eAAA;EAAAC,SAAA,EAAAA,CAAA,KAAAA;AAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAC,YAAA,CAAAN,iBAAA;AAAA,IAAAO,yBAAA,GAAqBC,OAAA;EAETN,eAAA,GAAL,gBAAKO,gBAAA,KACVA,gBAAA,CAAAC,YAAA,GAAe,gBACfD,gBAAA,CAAAE,eAAA,GAAkB,mBAClBF,gBAAA,CAAAG,oBAAA,GAAuB,wBACvBH,gBAAA,CAAAI,gBAAA,GAAmB,oBACnBJ,gBAAA,CAAAK,WAAA,GAAc,eALJL,gBAAA,GAAAP,eAAA;AAmBZ,eAAsBC,UAAUY,IAAA,EAAc;EAC5C,MAAMC,OAAA,GAAU,IAAIT,yBAAA,CAAAU,IAAA,CAAKF,IAAI,EAAEG,iBAAA,CAAkB;EAE5CF,OAAA,KACHG,OAAA,CAAQC,IAAA,CAAK,uCAAkC,GAC/CC,OAAA,CAAQC,IAAA,CAAK,CAAC,IAGhBH,OAAA,CAAQI,KAAA,CAAMP,OAAO,GACrBK,OAAA,CAAQC,IAAA,CAAK,CAAC;AAChB","ignoreList":[]}
|
|
@@ -0,0 +1,50 @@
|
|
|
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
|
+
__hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all) __defProp(target, name, {
|
|
9
|
+
get: all[name],
|
|
10
|
+
enumerable: !0
|
|
11
|
+
});
|
|
12
|
+
},
|
|
13
|
+
__copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
|
|
15
|
+
get: () => from[key],
|
|
16
|
+
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", {
|
|
26
|
+
value: mod,
|
|
27
|
+
enumerable: !0
|
|
28
|
+
}) : target, mod)),
|
|
29
|
+
__toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
30
|
+
value: !0
|
|
31
|
+
}), mod);
|
|
32
|
+
var constants_exports = {};
|
|
33
|
+
__export(constants_exports, {
|
|
34
|
+
CSS_FILE_NAME: () => CSS_FILE_NAME,
|
|
35
|
+
FAILED_EVAL: () => FAILED_EVAL,
|
|
36
|
+
MEDIA_SEP: () => MEDIA_SEP,
|
|
37
|
+
SHOULD_DEBUG: () => SHOULD_DEBUG,
|
|
38
|
+
cacheDir: () => cacheDir
|
|
39
|
+
});
|
|
40
|
+
module.exports = __toCommonJS(constants_exports);
|
|
41
|
+
var import_find_cache_dir = __toESM(require("find-cache-dir"));
|
|
42
|
+
const CSS_FILE_NAME = "__snack.css",
|
|
43
|
+
MEDIA_SEP = "_",
|
|
44
|
+
cacheDir = (0, import_find_cache_dir.default)({
|
|
45
|
+
name: "tamagui",
|
|
46
|
+
create: !0
|
|
47
|
+
}),
|
|
48
|
+
FAILED_EVAL = Symbol("failed_style_eval"),
|
|
49
|
+
SHOULD_DEBUG = process.env.DEBUG === "*" || process.env.DEBUG?.startsWith("tamagui");
|
|
50
|
+
//# sourceMappingURL=constants.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["constants_exports","__export","CSS_FILE_NAME","FAILED_EVAL","MEDIA_SEP","SHOULD_DEBUG","cacheDir","module","exports","__toCommonJS","import_find_cache_dir","__toESM","require","default","name","create","Symbol","process","env","DEBUG","startsWith"],"sources":["../src/constants.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,iBAAA;AAAAC,QAAA,CAAAD,iBAAA;EAAAE,aAAA,EAAAA,CAAA,KAAAA,aAAA;EAAAC,WAAA,EAAAA,CAAA,KAAAA,WAAA;EAAAC,SAAA,EAAAA,CAAA,KAAAA,SAAA;EAAAC,YAAA,EAAAA,CAAA,KAAAA,YAAA;EAAAC,QAAA,EAAAA,CAAA,KAAAA;AAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAC,YAAA,CAAAT,iBAAA;AAAA,IAAAU,qBAAA,GAAyBC,OAAA,CAAAC,OAAA;AAElB,MAAMV,aAAA,GAAgB;EAGhBE,SAAA,GAAY;EAGZE,QAAA,OAAWI,qBAAA,CAAAG,OAAA,EAAa;IAAEC,IAAA,EAAM;IAAWC,MAAA,EAAQ;EAAK,CAAC;EAEzDZ,WAAA,GAAca,MAAA,CAAO,mBAAmB;EAExCX,YAAA,GACXY,OAAA,CAAQC,GAAA,CAAIC,KAAA,KAAU,OAAOF,OAAA,CAAQC,GAAA,CAAIC,KAAA,EAAOC,UAAA,CAAW,SAAS","ignoreList":[]}
|
package/dist/exports.mjs
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all) __defProp(target, name, {
|
|
7
|
+
get: all[name],
|
|
8
|
+
enumerable: !0
|
|
9
|
+
});
|
|
10
|
+
},
|
|
11
|
+
__copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
|
|
13
|
+
get: () => from[key],
|
|
14
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
15
|
+
});
|
|
16
|
+
return to;
|
|
17
|
+
},
|
|
18
|
+
__reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
19
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
20
|
+
value: !0
|
|
21
|
+
}), mod);
|
|
22
|
+
var exports_exports = {};
|
|
23
|
+
__export(exports_exports, {
|
|
24
|
+
createExtractor: () => import_createExtractor.createExtractor,
|
|
25
|
+
literalToAst: () => import_literalToAst.literalToAst
|
|
26
|
+
});
|
|
27
|
+
module.exports = __toCommonJS(exports_exports);
|
|
28
|
+
__reExport(exports_exports, require("./checkDeps.mjs"), module.exports);
|
|
29
|
+
__reExport(exports_exports, require("./types.mjs"), module.exports);
|
|
30
|
+
var import_createExtractor = require("./extractor/createExtractor.mjs"),
|
|
31
|
+
import_literalToAst = require("./extractor/literalToAst.mjs");
|
|
32
|
+
__reExport(exports_exports, require("./constants.mjs"), module.exports);
|
|
33
|
+
__reExport(exports_exports, require("./extractor/extractToClassNames.mjs"), module.exports);
|
|
34
|
+
__reExport(exports_exports, require("./extractor/concatClassName.mjs"), module.exports);
|
|
35
|
+
__reExport(exports_exports, require("./extractor/extractToNative.mjs"), module.exports);
|
|
36
|
+
__reExport(exports_exports, require("./extractor/extractHelpers.mjs"), module.exports);
|
|
37
|
+
__reExport(exports_exports, require("./extractor/loadTamagui.mjs"), module.exports);
|
|
38
|
+
__reExport(exports_exports, require("./extractor/watchTamaguiConfig.mjs"), module.exports);
|
|
39
|
+
__reExport(exports_exports, require("./extractor/createLogger.mjs"), module.exports);
|
|
40
|
+
__reExport(exports_exports, require("./registerRequire.mjs"), module.exports);
|
|
41
|
+
__reExport(exports_exports, require("./getPragmaOptions.mjs"), module.exports);
|
|
42
|
+
//# sourceMappingURL=exports.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["exports_exports","__export","createExtractor","import_createExtractor","literalToAst","import_literalToAst","module","exports","__toCommonJS","__reExport","require"],"sources":["../src/exports.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,eAAA;AAAAC,QAAA,CAAAD,eAAA;EAAAE,eAAA,EAAAA,CAAA,KAAAC,sBAAA,CAAAD,eAAA;EAAAE,YAAA,EAAAA,CAAA,KAAAC,mBAAA,CAAAD;AAAA;AAAAE,MAAA,CAAAC,OAAA,GAAAC,YAAA,CAAAR,eAAA;AAAAS,UAAA,CAAAT,eAAA,EAAcU,OAAA,qBAAdJ,MAAA,CAAAC,OAAA;AACAE,UAAA,CAAAT,eAAA,EAAcU,OAAA,iBADdJ,MAAA,CAAAC,OAAA;AAEA,IAAAJ,sBAAA,GAAgCO,OAAA;EAChCL,mBAAA,GAA6BK,OAAA;AAC7BD,UAAA,CAAAT,eAAA,EAAcU,OAAA,qBAJdJ,MAAA,CAAAC,OAAA;AAKAE,UAAA,CAAAT,eAAA,EAAcU,OAAA,yCALdJ,MAAA,CAAAC,OAAA;AAMAE,UAAA,CAAAT,eAAA,EAAcU,OAAA,qCANdJ,MAAA,CAAAC,OAAA;AAOAE,UAAA,CAAAT,eAAA,EAAcU,OAAA,qCAPdJ,MAAA,CAAAC,OAAA;AAQAE,UAAA,CAAAT,eAAA,EAAcU,OAAA,oCARdJ,MAAA,CAAAC,OAAA;AASAE,UAAA,CAAAT,eAAA,EAAcU,OAAA,iCATdJ,MAAA,CAAAC,OAAA;AAUAE,UAAA,CAAAT,eAAA,EAAcU,OAAA,wCAVdJ,MAAA,CAAAC,OAAA;AAWAE,UAAA,CAAAT,eAAA,EAAcU,OAAA,kCAXdJ,MAAA,CAAAC,OAAA;AAYAE,UAAA,CAAAT,eAAA,EAAcU,OAAA,2BAZdJ,MAAA,CAAAC,OAAA;AAaAE,UAAA,CAAAT,eAAA,EAAcU,OAAA,4BAbdJ,MAAA,CAAAC,OAAA","ignoreList":[]}
|
|
@@ -0,0 +1,47 @@
|
|
|
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
|
+
__hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all) __defProp(target, name, {
|
|
9
|
+
get: all[name],
|
|
10
|
+
enumerable: !0
|
|
11
|
+
});
|
|
12
|
+
},
|
|
13
|
+
__copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
|
|
15
|
+
get: () => from[key],
|
|
16
|
+
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", {
|
|
26
|
+
value: mod,
|
|
27
|
+
enumerable: !0
|
|
28
|
+
}) : target, mod)),
|
|
29
|
+
__toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
30
|
+
value: !0
|
|
31
|
+
}), mod);
|
|
32
|
+
var accessSafe_exports = {};
|
|
33
|
+
__export(accessSafe_exports, {
|
|
34
|
+
accessSafe: () => accessSafe
|
|
35
|
+
});
|
|
36
|
+
module.exports = __toCommonJS(accessSafe_exports);
|
|
37
|
+
var t = __toESM(require("@babel/types"));
|
|
38
|
+
function accessSafe(obj, member) {
|
|
39
|
+
return t.logicalExpression("&&", t.logicalExpression("&&",
|
|
40
|
+
// typeof obj === 'object
|
|
41
|
+
t.binaryExpression("===", t.unaryExpression("typeof", obj), t.stringLiteral("object")),
|
|
42
|
+
// obj !== null
|
|
43
|
+
t.binaryExpression("!==", obj, t.nullLiteral())),
|
|
44
|
+
// obj.member
|
|
45
|
+
t.memberExpression(obj, t.identifier(member), !1));
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=accessSafe.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["accessSafe_exports","__export","accessSafe","module","exports","__toCommonJS","t","__toESM","require","obj","member","logicalExpression","binaryExpression","unaryExpression","stringLiteral","nullLiteral","memberExpression","identifier"],"sources":["../../src/extractor/accessSafe.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,kBAAA;AAAAC,QAAA,CAAAD,kBAAA;EAAAE,UAAA,EAAAA,CAAA,KAAAA;AAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAC,YAAA,CAAAL,kBAAA;AAAA,IAAAM,CAAA,GAAmBC,OAAA,CAAAC,OAAA;AAIZ,SAASN,WAAWO,GAAA,EAAmBC,MAAA,EAAqC;EACjF,OAAOJ,CAAA,CAAEK,iBAAA,CACP,MACAL,CAAA,CAAEK,iBAAA,CACA;EAAA;EAEAL,CAAA,CAAEM,gBAAA,CACA,OACAN,CAAA,CAAEO,eAAA,CAAgB,UAAUJ,GAAG,GAC/BH,CAAA,CAAEQ,aAAA,CAAc,QAAQ,CAC1B;EAAA;EAEAR,CAAA,CAAEM,gBAAA,CAAiB,OAAOH,GAAA,EAAKH,CAAA,CAAES,WAAA,CAAY,CAAC,CAChD;EAAA;EAEAT,CAAA,CAAEU,gBAAA,CAAiBP,GAAA,EAAKH,CAAA,CAAEW,UAAA,CAAWP,MAAM,GAAG,EAAK,CACrD;AACF","ignoreList":[]}
|
|
@@ -0,0 +1,55 @@
|
|
|
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
|
+
__hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all) __defProp(target, name, {
|
|
9
|
+
get: all[name],
|
|
10
|
+
enumerable: !0
|
|
11
|
+
});
|
|
12
|
+
},
|
|
13
|
+
__copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
|
|
15
|
+
get: () => from[key],
|
|
16
|
+
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", {
|
|
26
|
+
value: mod,
|
|
27
|
+
enumerable: !0
|
|
28
|
+
}) : target, mod)),
|
|
29
|
+
__toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
30
|
+
value: !0
|
|
31
|
+
}), mod);
|
|
32
|
+
var babelParse_exports = {};
|
|
33
|
+
__export(babelParse_exports, {
|
|
34
|
+
babelParse: () => babelParse,
|
|
35
|
+
parserOptions: () => parserOptions
|
|
36
|
+
});
|
|
37
|
+
module.exports = __toCommonJS(babelParse_exports);
|
|
38
|
+
var babelParser = __toESM(require("@babel/parser"));
|
|
39
|
+
const plugins = ["asyncGenerators", "classProperties", "dynamicImport", "functionBind", "jsx", "numericSeparator", "objectRestSpread", "optionalCatchBinding", "decorators-legacy", "typescript", "optionalChaining", "nullishCoalescingOperator"],
|
|
40
|
+
parserOptions = Object.freeze({
|
|
41
|
+
plugins,
|
|
42
|
+
sourceType: "module"
|
|
43
|
+
}),
|
|
44
|
+
parser = babelParser.parse.bind(babelParser);
|
|
45
|
+
function babelParse(code, fileName) {
|
|
46
|
+
const codeString = code.toString();
|
|
47
|
+
try {
|
|
48
|
+
return parser(codeString, parserOptions);
|
|
49
|
+
} catch (err) {
|
|
50
|
+
throw new Error(`Error parsing babel: ${err} in ${fileName}, code:
|
|
51
|
+
${codeString}
|
|
52
|
+
${err.stack}`);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=babelParse.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["babelParse_exports","__export","babelParse","parserOptions","module","exports","__toCommonJS","babelParser","__toESM","require","plugins","Object","freeze","sourceType","parser","parse","bind","code","fileName","codeString","toString","err","Error","stack"],"sources":["../../src/extractor/babelParse.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,kBAAA;AAAAC,QAAA,CAAAD,kBAAA;EAAAE,UAAA,EAAAA,CAAA,KAAAA,UAAA;EAAAC,aAAA,EAAAA,CAAA,KAAAA;AAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAC,YAAA,CAAAN,kBAAA;AAAA,IAAAO,WAAA,GAA6BC,OAAA,CAAAC,OAAA;AAG7B,MAAMC,OAAA,GAAsC,CAC1C,mBACA,mBACA,iBACA,gBACA,OACA,oBACA,oBACA,wBACA,qBACA,cACA,oBACA,4BACF;EAEaP,aAAA,GAA2CQ,MAAA,CAAOC,MAAA,CAAO;IACpEF,OAAA;IACAG,UAAA,EAAY;EACd,CAAC;EAEKC,MAAA,GAASP,WAAA,CAAYQ,KAAA,CAAMC,IAAA,CAAKT,WAAW;AAE1C,SAASL,WAAWe,IAAA,EAAuBC,QAAA,EAA2B;EAC3E,MAAMC,UAAA,GAAaF,IAAA,CAAKG,QAAA,CAAS;EACjC,IAAI;IACF,OAAON,MAAA,CAAOK,UAAA,EAAYhB,aAAa;EACzC,SAASkB,GAAA,EAAK;IACZ,MAAM,IAAIC,KAAA,CACR,wBAAwBD,GAAG,OAAOH,QAAQ;AAAA,EAAYC,UAAU;AAAA,GAC7DE,GAAA,CAAYE,KACf,EACF;EACF;AACF","ignoreList":[]}
|