create-vxrn 0.1.0

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.
Files changed (61) hide show
  1. package/LICENSE +21 -0
  2. package/biome.json +78 -0
  3. package/dist/helpers/cloneStarter.js +79 -0
  4. package/dist/helpers/cloneStarter.js.map +6 -0
  5. package/dist/helpers/cloneStarter.native.js +320 -0
  6. package/dist/helpers/cloneStarter.native.js.map +6 -0
  7. package/dist/helpers/getProjectName.js +45 -0
  8. package/dist/helpers/getProjectName.js.map +6 -0
  9. package/dist/helpers/getProjectName.native.js +185 -0
  10. package/dist/helpers/getProjectName.native.js.map +6 -0
  11. package/dist/helpers/getTemplateInfo.js +38 -0
  12. package/dist/helpers/getTemplateInfo.js.map +6 -0
  13. package/dist/helpers/getTemplateInfo.native.js +191 -0
  14. package/dist/helpers/getTemplateInfo.native.js.map +6 -0
  15. package/dist/helpers/installDependencies.js +33 -0
  16. package/dist/helpers/installDependencies.js.map +6 -0
  17. package/dist/helpers/installDependencies.native.js +187 -0
  18. package/dist/helpers/installDependencies.native.js.map +6 -0
  19. package/dist/helpers/validateNpmPackage.js +36 -0
  20. package/dist/helpers/validateNpmPackage.js.map +6 -0
  21. package/dist/helpers/validateNpmPackage.native.js +74 -0
  22. package/dist/helpers/validateNpmPackage.native.js.map +6 -0
  23. package/dist/index.js +114 -0
  24. package/dist/index.js.map +6 -0
  25. package/dist/index.native.js +300 -0
  26. package/dist/index.native.js.map +6 -0
  27. package/dist/steps/bare.js +38 -0
  28. package/dist/steps/bare.js.map +6 -0
  29. package/dist/steps/bare.native.js +163 -0
  30. package/dist/steps/bare.native.js.map +6 -0
  31. package/dist/steps/expo-router.js +41 -0
  32. package/dist/steps/expo-router.js.map +6 -0
  33. package/dist/steps/expo-router.native.js +168 -0
  34. package/dist/steps/expo-router.native.js.map +6 -0
  35. package/dist/steps/tamagui.js +41 -0
  36. package/dist/steps/tamagui.js.map +6 -0
  37. package/dist/steps/tamagui.native.js +168 -0
  38. package/dist/steps/tamagui.native.js.map +6 -0
  39. package/dist/steps/types.js +14 -0
  40. package/dist/steps/types.js.map +6 -0
  41. package/dist/steps/types.native.js +15 -0
  42. package/dist/steps/types.native.js.map +6 -0
  43. package/dist/templates.js +84 -0
  44. package/dist/templates.js.map +6 -0
  45. package/dist/templates.native.js +97 -0
  46. package/dist/templates.native.js.map +6 -0
  47. package/package.json +33 -0
  48. package/readme.md +5 -0
  49. package/run.js +12 -0
  50. package/src/helpers/cloneStarter.ts +115 -0
  51. package/src/helpers/getProjectName.ts +46 -0
  52. package/src/helpers/getTemplateInfo.ts +32 -0
  53. package/src/helpers/installDependencies.ts +14 -0
  54. package/src/helpers/validateNpmPackage.ts +16 -0
  55. package/src/index.ts +170 -0
  56. package/src/steps/bare.ts +21 -0
  57. package/src/steps/expo-router.ts +25 -0
  58. package/src/steps/tamagui.ts +25 -0
  59. package/src/steps/types.ts +5 -0
  60. package/src/templates.ts +62 -0
  61. package/tsconfig.json +12 -0
@@ -0,0 +1,185 @@
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, __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: !0 });
10
+ }, __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from == "object" || typeof from == "function")
12
+ for (let key of __getOwnPropNames(from))
13
+ !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ return to;
15
+ };
16
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
17
+ // If the importer is in node compatibility mode or this is not an ESM
18
+ // file that has been converted to a CommonJS file using a Babel-
19
+ // compatible transform (i.e. "__esModule" has not been set), then set
20
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
22
+ mod
23
+ )), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
24
+ var getProjectName_exports = {};
25
+ __export(getProjectName_exports, {
26
+ getProjectName: () => getProjectName
27
+ });
28
+ module.exports = __toCommonJS(getProjectName_exports);
29
+ var import_node_path = __toESM(require("node:path")), import_ansis = __toESM(require("ansis")), import_prompts = __toESM(require("prompts")), import_package = __toESM(require("../../package.json")), import_validateNpmPackage = require("./validateNpmPackage");
30
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
31
+ try {
32
+ var info = gen[key](arg), value = info.value;
33
+ } catch (error) {
34
+ reject(error);
35
+ return;
36
+ }
37
+ info.done ? resolve(value) : Promise.resolve(value).then(_next, _throw);
38
+ }
39
+ function _async_to_generator(fn) {
40
+ return function() {
41
+ var self = this, args = arguments;
42
+ return new Promise(function(resolve, reject) {
43
+ var gen = fn.apply(self, args);
44
+ function _next(value) {
45
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
46
+ }
47
+ function _throw(err) {
48
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
49
+ }
50
+ _next(void 0);
51
+ });
52
+ };
53
+ }
54
+ function _ts_generator(thisArg, body) {
55
+ var f, y, t, g, _ = {
56
+ label: 0,
57
+ sent: function() {
58
+ if (t[0] & 1)
59
+ throw t[1];
60
+ return t[1];
61
+ },
62
+ trys: [],
63
+ ops: []
64
+ };
65
+ return g = {
66
+ next: verb(0),
67
+ throw: verb(1),
68
+ return: verb(2)
69
+ }, typeof Symbol == "function" && (g[Symbol.iterator] = function() {
70
+ return this;
71
+ }), g;
72
+ function verb(n) {
73
+ return function(v) {
74
+ return step([
75
+ n,
76
+ v
77
+ ]);
78
+ };
79
+ }
80
+ function step(op) {
81
+ if (f)
82
+ throw new TypeError("Generator is already executing.");
83
+ for (; _; )
84
+ try {
85
+ if (f = 1, y && (t = op[0] & 2 ? y.return : op[0] ? y.throw || ((t = y.return) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
86
+ return t;
87
+ switch (y = 0, t && (op = [
88
+ op[0] & 2,
89
+ t.value
90
+ ]), op[0]) {
91
+ case 0:
92
+ case 1:
93
+ t = op;
94
+ break;
95
+ case 4:
96
+ return _.label++, {
97
+ value: op[1],
98
+ done: !1
99
+ };
100
+ case 5:
101
+ _.label++, y = op[1], op = [
102
+ 0
103
+ ];
104
+ continue;
105
+ case 7:
106
+ op = _.ops.pop(), _.trys.pop();
107
+ continue;
108
+ default:
109
+ if (t = _.trys, !(t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
110
+ _ = 0;
111
+ continue;
112
+ }
113
+ if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
114
+ _.label = op[1];
115
+ break;
116
+ }
117
+ if (op[0] === 6 && _.label < t[1]) {
118
+ _.label = t[1], t = op;
119
+ break;
120
+ }
121
+ if (t && _.label < t[2]) {
122
+ _.label = t[2], _.ops.push(op);
123
+ break;
124
+ }
125
+ t[2] && _.ops.pop(), _.trys.pop();
126
+ continue;
127
+ }
128
+ op = body.call(thisArg, _);
129
+ } catch (e) {
130
+ op = [
131
+ 6,
132
+ e
133
+ ], y = 0;
134
+ } finally {
135
+ f = t = 0;
136
+ }
137
+ if (op[0] & 5)
138
+ throw op[1];
139
+ return {
140
+ value: op[0] ? op[1] : void 0,
141
+ done: !0
142
+ };
143
+ }
144
+ }
145
+ var getProjectName = function() {
146
+ var _ref = _async_to_generator(function(projectPath) {
147
+ var res;
148
+ return _ts_generator(this, function(_state) {
149
+ switch (_state.label) {
150
+ case 0:
151
+ return typeof projectPath == "string" && (projectPath = projectPath.trim()), projectPath ? [
152
+ 3,
153
+ 2
154
+ ] : [
155
+ 4,
156
+ (0, import_prompts.default)({
157
+ type: "text",
158
+ name: "path",
159
+ message: "Project name:",
160
+ initial: "myapp",
161
+ validate: function(name) {
162
+ var validation = (0, import_validateNpmPackage.validateNpmName)(import_node_path.default.basename(import_node_path.default.resolve(name)));
163
+ return validation.valid ? !0 : "Invalid project name: " + validation.problems[0];
164
+ }
165
+ })
166
+ ];
167
+ case 1:
168
+ res = _state.sent(), typeof res.path == "string" && (projectPath = res.path.trim()), _state.label = 2;
169
+ case 2:
170
+ return projectPath || (console.info(), console.info("Please specify the project directory:"), console.info(" ".concat(import_ansis.default.cyan(import_package.default.name), " ").concat(import_ansis.default.green("<project-directory>"))), console.info(), console.info("For example:"), console.info(" ".concat(import_ansis.default.cyan(import_package.default.name), " ").concat(import_ansis.default.green("my-app"))), console.info(), console.info("Run ".concat(import_ansis.default.cyan("".concat(import_package.default.name, " --help")), " to see all options.")), process.exit(1)), [
171
+ 2,
172
+ projectPath
173
+ ];
174
+ }
175
+ });
176
+ });
177
+ return function(projectPath) {
178
+ return _ref.apply(this, arguments);
179
+ };
180
+ }();
181
+ // Annotate the CommonJS export names for ESM import in node:
182
+ 0 && (module.exports = {
183
+ getProjectName
184
+ });
185
+ //# sourceMappingURL=getProjectName.js.map
@@ -0,0 +1,6 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/helpers/Users/n8/vxrn/packages/create-vxrn/src/helpers/getProjectName.ts"],
4
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uBAAiB,+BAEjB,eAAkB,2BAClB,iBAAoB,6BAEpB,iBAAwB,wCACxB,4BAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEzB,IAAMA,iBAAAA,WAAAA;aAAiB,oBAAA,SAAOC,aAAAA;QAM3BC;;;;iBALJ,OAAOD,eAAgB,aACzBA,cAAcA,YAAYE,KAAI,IAG3BF,cAAD;;;cACU;;gBAAMG,eAAAA,SAAQ;cACxBC,MAAM;cACNC,MAAM;cACNC,SAAS;cACTC,SAAS;cACTC,UAAU,SAACH,MAAAA;AACT,oBAAMI,iBAAaC,2CAAgBC,iBAAAA,QAAKC,SAASD,iBAAAA,QAAKE,QAAQR,IAAAA,CAAAA,CAAAA;AAC9D,uBAAII,WAAWK,QACN,KAEF,2BAA2BL,WAAWM,SAAU,CAAA;cACzD;YACF,CAAA;;;AAZMd,gBAAM,OAAA,KAAA,GAcR,OAAOA,IAAIU,QAAS,aACtBX,cAAcC,IAAIU,KAAKT,KAAI;;AAI/B,iBAAKF,gBACHgB,QAAQC,KAAI,GACZD,QAAQC,KAAK,uCAAA,GACbD,QAAQC,KAAM,KAAoCC,OAAhCA,aAAAA,QAAMC,KAAKC,eAAAA,QAAYf,IAAI,GAAE,GAAA,EAAsC,OAAnCa,aAAAA,QAAMG,MAAM,qBAAA,CAAA,CAAA,GAC9DL,QAAQC,KAAI,GACZD,QAAQC,KAAK,cAAA,GACbD,QAAQC,KAAM,KAAoCC,OAAhCA,aAAAA,QAAMC,KAAKC,eAAAA,QAAYf,IAAI,GAAE,GAAA,EAAyB,OAAtBa,aAAAA,QAAMG,MAAM,QAAA,CAAA,CAAA,GAC9DL,QAAQC,KAAI,GACZD,QAAQC,KAAM,OAA+C,OAAzCC,aAAAA,QAAMC,KAAM,GAAmB,OAAjBC,eAAAA,QAAYf,MAAK,SAAA,CAAA,GAAU,sBAAA,CAAA,GAC7DiB,QAAQC,KAAK,CAAA,IAEf;;YAAOvB;;;;EACT,CAAA;kBArCqCA,aAAAA;;;;",
5
+ "names": ["getProjectName", "projectPath", "res", "trim", "prompts", "type", "name", "message", "initial", "validate", "validation", "validateNpmName", "path", "basename", "resolve", "valid", "problems", "console", "info", "ansis", "cyan", "packageJson", "green", "process", "exit"]
6
+ }
@@ -0,0 +1,38 @@
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, __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: !0 });
9
+ }, __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from == "object" || typeof from == "function")
11
+ for (let key of __getOwnPropNames(from))
12
+ !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
13
+ return to;
14
+ };
15
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
16
+ // If the importer is in node compatibility mode or this is not an ESM
17
+ // file that has been converted to a CommonJS file using a Babel-
18
+ // compatible transform (i.e. "__esModule" has not been set), then set
19
+ // "default" to the CommonJS "module.exports" for node compatibility.
20
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
21
+ mod
22
+ )), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
23
+ var getTemplateInfo_exports = {};
24
+ __export(getTemplateInfo_exports, {
25
+ getTemplateInfo: () => getTemplateInfo
26
+ });
27
+ module.exports = __toCommonJS(getTemplateInfo_exports);
28
+ var import_prompts = __toESM(require("prompts")), import_templates = require("../templates");
29
+ const validTemplates = import_templates.templates.map(({ value }) => value).join(", "), getTemplateInfo = async (template) => {
30
+ let res = getValidTemplate(template);
31
+ return template && !res && (console.warn(`template ${template} is not valid. valid options: ${validTemplates}`), process.exit(1)), res || (template = (await (0, import_prompts.default)({
32
+ name: "template",
33
+ type: "select",
34
+ message: "Pick a template:",
35
+ choices: import_templates.templates.filter((t) => !t.hidden)
36
+ })).template), res = getValidTemplate(`${template}`), res || (console.warn(`template ${template} is not valid. valid options: ${validTemplates}`), process.exit(1)), res;
37
+ }, getValidTemplate = (template) => typeof template == "string" && import_templates.templates.find(({ value }) => value === template);
38
+ //# sourceMappingURL=getTemplateInfo.js.map
@@ -0,0 +1,6 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/helpers/getTemplateInfo.ts"],
4
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,qBAAoB,6BAEpB,mBAA0B;AAE1B,MAAM,iBAAiB,2BAAU,IAAI,CAAC,EAAE,MAAM,MAAM,KAAK,EAAE,KAAK,IAAI,GAEvD,kBAAkB,OAAO,aAA2D;AAC/F,MAAI,MAAM,iBAAiB,QAAQ;AACnC,SAAI,YAAY,CAAC,QACf,QAAQ,KAAK,YAAY,QAAQ,iCAAiC,cAAc,EAAE,GAClF,QAAQ,KAAK,CAAC,IAEX,QACH,YACE,UAAM,eAAAA,SAAQ;AAAA,IACZ,MAAM;AAAA,IACN,MAAM;AAAA,IACN,SAAS;AAAA,IACT,SAAS,2BAAU,OAAO,CAAC,MAAM,CAAC,EAAE,MAAM;AAAA,EAC5C,CAAC,GACD,WAEJ,MAAM,iBAAiB,GAAG,QAAQ,EAAE,GAC/B,QACH,QAAQ,KAAK,YAAY,QAAQ,iCAAiC,cAAc,EAAE,GAClF,QAAQ,KAAK,CAAC,IAET;AACT,GAEM,mBAAmB,CAAC,aACxB,OAAO,YAAa,YAAY,2BAAU,KAAK,CAAC,EAAE,MAAM,MAAM,UAAU,QAAQ;",
5
+ "names": ["prompts"]
6
+ }
@@ -0,0 +1,191 @@
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, __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: !0 });
10
+ }, __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from == "object" || typeof from == "function")
12
+ for (let key of __getOwnPropNames(from))
13
+ !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ return to;
15
+ };
16
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
17
+ // If the importer is in node compatibility mode or this is not an ESM
18
+ // file that has been converted to a CommonJS file using a Babel-
19
+ // compatible transform (i.e. "__esModule" has not been set), then set
20
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
22
+ mod
23
+ )), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
24
+ var getTemplateInfo_exports = {};
25
+ __export(getTemplateInfo_exports, {
26
+ getTemplateInfo: () => getTemplateInfo
27
+ });
28
+ module.exports = __toCommonJS(getTemplateInfo_exports);
29
+ var import_prompts = __toESM(require("prompts")), import_templates = require("../templates");
30
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
31
+ try {
32
+ var info = gen[key](arg), value = info.value;
33
+ } catch (error) {
34
+ reject(error);
35
+ return;
36
+ }
37
+ info.done ? resolve(value) : Promise.resolve(value).then(_next, _throw);
38
+ }
39
+ function _async_to_generator(fn) {
40
+ return function() {
41
+ var self = this, args = arguments;
42
+ return new Promise(function(resolve, reject) {
43
+ var gen = fn.apply(self, args);
44
+ function _next(value) {
45
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
46
+ }
47
+ function _throw(err) {
48
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
49
+ }
50
+ _next(void 0);
51
+ });
52
+ };
53
+ }
54
+ function _ts_generator(thisArg, body) {
55
+ var f, y, t, g, _ = {
56
+ label: 0,
57
+ sent: function() {
58
+ if (t[0] & 1)
59
+ throw t[1];
60
+ return t[1];
61
+ },
62
+ trys: [],
63
+ ops: []
64
+ };
65
+ return g = {
66
+ next: verb(0),
67
+ throw: verb(1),
68
+ return: verb(2)
69
+ }, typeof Symbol == "function" && (g[Symbol.iterator] = function() {
70
+ return this;
71
+ }), g;
72
+ function verb(n) {
73
+ return function(v) {
74
+ return step([
75
+ n,
76
+ v
77
+ ]);
78
+ };
79
+ }
80
+ function step(op) {
81
+ if (f)
82
+ throw new TypeError("Generator is already executing.");
83
+ for (; _; )
84
+ try {
85
+ if (f = 1, y && (t = op[0] & 2 ? y.return : op[0] ? y.throw || ((t = y.return) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
86
+ return t;
87
+ switch (y = 0, t && (op = [
88
+ op[0] & 2,
89
+ t.value
90
+ ]), op[0]) {
91
+ case 0:
92
+ case 1:
93
+ t = op;
94
+ break;
95
+ case 4:
96
+ return _.label++, {
97
+ value: op[1],
98
+ done: !1
99
+ };
100
+ case 5:
101
+ _.label++, y = op[1], op = [
102
+ 0
103
+ ];
104
+ continue;
105
+ case 7:
106
+ op = _.ops.pop(), _.trys.pop();
107
+ continue;
108
+ default:
109
+ if (t = _.trys, !(t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
110
+ _ = 0;
111
+ continue;
112
+ }
113
+ if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
114
+ _.label = op[1];
115
+ break;
116
+ }
117
+ if (op[0] === 6 && _.label < t[1]) {
118
+ _.label = t[1], t = op;
119
+ break;
120
+ }
121
+ if (t && _.label < t[2]) {
122
+ _.label = t[2], _.ops.push(op);
123
+ break;
124
+ }
125
+ t[2] && _.ops.pop(), _.trys.pop();
126
+ continue;
127
+ }
128
+ op = body.call(thisArg, _);
129
+ } catch (e) {
130
+ op = [
131
+ 6,
132
+ e
133
+ ], y = 0;
134
+ } finally {
135
+ f = t = 0;
136
+ }
137
+ if (op[0] & 5)
138
+ throw op[1];
139
+ return {
140
+ value: op[0] ? op[1] : void 0,
141
+ done: !0
142
+ };
143
+ }
144
+ }
145
+ var validTemplates = import_templates.templates.map(function(param) {
146
+ var value = param.value;
147
+ return value;
148
+ }).join(", "), getTemplateInfo = function() {
149
+ var _ref = _async_to_generator(function(template) {
150
+ var res;
151
+ return _ts_generator(this, function(_state) {
152
+ switch (_state.label) {
153
+ case 0:
154
+ return res = getValidTemplate(template), template && !res && (console.warn("template ".concat(template, " is not valid. valid options: ").concat(validTemplates)), process.exit(1)), res ? [
155
+ 3,
156
+ 2
157
+ ] : [
158
+ 4,
159
+ (0, import_prompts.default)({
160
+ name: "template",
161
+ type: "select",
162
+ message: "Pick a template:",
163
+ choices: import_templates.templates.filter(function(t) {
164
+ return !t.hidden;
165
+ })
166
+ })
167
+ ];
168
+ case 1:
169
+ template = _state.sent().template, _state.label = 2;
170
+ case 2:
171
+ return res = getValidTemplate("".concat(template)), res || (console.warn("template ".concat(template, " is not valid. valid options: ").concat(validTemplates)), process.exit(1)), [
172
+ 2,
173
+ res
174
+ ];
175
+ }
176
+ });
177
+ });
178
+ return function(template) {
179
+ return _ref.apply(this, arguments);
180
+ };
181
+ }(), getValidTemplate = function(template) {
182
+ return typeof template == "string" && import_templates.templates.find(function(param) {
183
+ var value = param.value;
184
+ return value === template;
185
+ });
186
+ };
187
+ // Annotate the CommonJS export names for ESM import in node:
188
+ 0 && (module.exports = {
189
+ getTemplateInfo
190
+ });
191
+ //# sourceMappingURL=getTemplateInfo.js.map
@@ -0,0 +1,6 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/helpers/Users/n8/vxrn/packages/create-vxrn/src/helpers/getTemplateInfo.ts"],
4
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qBAAoB,6BAEpB,mBAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAE1B,IAAMA,iBAAiBC,2BAAUC,IAAI,SAAA,OAAA;MAAGC,QAAAA,MAAAA;SAAYA;GAAOC,KAAK,IAAA,GAEnDC,kBAAAA,WAAAA;aAAkB,oBAAA,SAAOC,UAAAA;QAChCC;;;;iBAAAA,MAAMC,iBAAiBF,QAAAA,GACvBA,YAAY,CAACC,QACfE,QAAQC,KAAM,YAAoDV,OAAzCM,UAAS,gCAAA,EAA+C,OAAfN,cAAAA,CAAAA,GAClEW,QAAQC,KAAK,CAAA,IAEVL,MAAD;;;cAEA;;gBAAMM,eAAAA,SAAQ;cACZC,MAAM;cACNC,MAAM;cACNC,SAAU;cACVC,SAAShB,2BAAUiB,OAAO,SAACC,GAAAA;uBAAM,CAACA,EAAEC;;YACtC,CAAA;;;AANFd,qBACE,OAAA,KAAA,EAMAA;;AAEJC,uBAAMC,iBAAkB,GAAW,OAATF,QAAAA,CAAAA,GACrBC,QACHE,QAAQC,KAAM,YAAoDV,OAAzCM,UAAS,gCAAA,EAA+C,OAAfN,cAAAA,CAAAA,GAClEW,QAAQC,KAAK,CAAA,IAEf;;YAAOL;;;;EACT,CAAA;kBAtBsCD,UAAAA;;;KAwBhCE,mBAAmB,SAACF,UAAAA;SACxB,OAAOA,YAAa,YAAYL,2BAAUoB,KAAK,SAAA,OAAA;QAAGlB,QAAAA,MAAAA;WAAYA,UAAUG;;;",
5
+ "names": ["validTemplates", "templates", "map", "value", "join", "getTemplateInfo", "template", "res", "getValidTemplate", "console", "warn", "process", "exit", "prompts", "name", "type", "message", "choices", "filter", "t", "hidden", "find"]
6
+ }
@@ -0,0 +1,33 @@
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, __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: !0 });
9
+ }, __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from == "object" || typeof from == "function")
11
+ for (let key of __getOwnPropNames(from))
12
+ !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
13
+ return to;
14
+ };
15
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
16
+ // If the importer is in node compatibility mode or this is not an ESM
17
+ // file that has been converted to a CommonJS file using a Babel-
18
+ // compatible transform (i.e. "__esModule" has not been set), then set
19
+ // "default" to the CommonJS "module.exports" for node compatibility.
20
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
21
+ mod
22
+ )), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
23
+ var installDependencies_exports = {};
24
+ __export(installDependencies_exports, {
25
+ installDependencies: () => installDependencies
26
+ });
27
+ module.exports = __toCommonJS(installDependencies_exports);
28
+ var PackageManager = __toESM(require("@expo/package-manager"));
29
+ async function installDependencies(projectRoot, packageManager) {
30
+ const options = { cwd: projectRoot };
31
+ packageManager === "yarn" ? await new PackageManager.YarnPackageManager(options).installAsync() : await new PackageManager.NpmPackageManager(options).installAsync();
32
+ }
33
+ //# sourceMappingURL=installDependencies.js.map
@@ -0,0 +1,6 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/helpers/installDependencies.ts"],
4
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,qBAAgC;AAEhC,eAAsB,oBACpB,aACA,gBACA;AACA,QAAM,UAAU,EAAE,KAAK,YAAY;AACnC,EAAI,mBAAmB,SAErB,MADa,IAAI,eAAe,mBAAmB,OAAO,EAC/C,aAAa,IAExB,MAAM,IAAI,eAAe,kBAAkB,OAAO,EAAE,aAAa;AAErE;",
5
+ "names": []
6
+ }
@@ -0,0 +1,187 @@
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, __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: !0 });
10
+ }, __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from == "object" || typeof from == "function")
12
+ for (let key of __getOwnPropNames(from))
13
+ !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ return to;
15
+ };
16
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
17
+ // If the importer is in node compatibility mode or this is not an ESM
18
+ // file that has been converted to a CommonJS file using a Babel-
19
+ // compatible transform (i.e. "__esModule" has not been set), then set
20
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
22
+ mod
23
+ )), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
24
+ var installDependencies_exports = {};
25
+ __export(installDependencies_exports, {
26
+ installDependencies: () => installDependencies
27
+ });
28
+ module.exports = __toCommonJS(installDependencies_exports);
29
+ var PackageManager = __toESM(require("@expo/package-manager"));
30
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
31
+ try {
32
+ var info = gen[key](arg), value = info.value;
33
+ } catch (error) {
34
+ reject(error);
35
+ return;
36
+ }
37
+ info.done ? resolve(value) : Promise.resolve(value).then(_next, _throw);
38
+ }
39
+ function _async_to_generator(fn) {
40
+ return function() {
41
+ var self = this, args = arguments;
42
+ return new Promise(function(resolve, reject) {
43
+ var gen = fn.apply(self, args);
44
+ function _next(value) {
45
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
46
+ }
47
+ function _throw(err) {
48
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
49
+ }
50
+ _next(void 0);
51
+ });
52
+ };
53
+ }
54
+ function _ts_generator(thisArg, body) {
55
+ var f, y, t, g, _ = {
56
+ label: 0,
57
+ sent: function() {
58
+ if (t[0] & 1)
59
+ throw t[1];
60
+ return t[1];
61
+ },
62
+ trys: [],
63
+ ops: []
64
+ };
65
+ return g = {
66
+ next: verb(0),
67
+ throw: verb(1),
68
+ return: verb(2)
69
+ }, typeof Symbol == "function" && (g[Symbol.iterator] = function() {
70
+ return this;
71
+ }), g;
72
+ function verb(n) {
73
+ return function(v) {
74
+ return step([
75
+ n,
76
+ v
77
+ ]);
78
+ };
79
+ }
80
+ function step(op) {
81
+ if (f)
82
+ throw new TypeError("Generator is already executing.");
83
+ for (; _; )
84
+ try {
85
+ if (f = 1, y && (t = op[0] & 2 ? y.return : op[0] ? y.throw || ((t = y.return) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
86
+ return t;
87
+ switch (y = 0, t && (op = [
88
+ op[0] & 2,
89
+ t.value
90
+ ]), op[0]) {
91
+ case 0:
92
+ case 1:
93
+ t = op;
94
+ break;
95
+ case 4:
96
+ return _.label++, {
97
+ value: op[1],
98
+ done: !1
99
+ };
100
+ case 5:
101
+ _.label++, y = op[1], op = [
102
+ 0
103
+ ];
104
+ continue;
105
+ case 7:
106
+ op = _.ops.pop(), _.trys.pop();
107
+ continue;
108
+ default:
109
+ if (t = _.trys, !(t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
110
+ _ = 0;
111
+ continue;
112
+ }
113
+ if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
114
+ _.label = op[1];
115
+ break;
116
+ }
117
+ if (op[0] === 6 && _.label < t[1]) {
118
+ _.label = t[1], t = op;
119
+ break;
120
+ }
121
+ if (t && _.label < t[2]) {
122
+ _.label = t[2], _.ops.push(op);
123
+ break;
124
+ }
125
+ t[2] && _.ops.pop(), _.trys.pop();
126
+ continue;
127
+ }
128
+ op = body.call(thisArg, _);
129
+ } catch (e) {
130
+ op = [
131
+ 6,
132
+ e
133
+ ], y = 0;
134
+ } finally {
135
+ f = t = 0;
136
+ }
137
+ if (op[0] & 5)
138
+ throw op[1];
139
+ return {
140
+ value: op[0] ? op[1] : void 0,
141
+ done: !0
142
+ };
143
+ }
144
+ }
145
+ function installDependencies(projectRoot, packageManager) {
146
+ return _installDependencies.apply(this, arguments);
147
+ }
148
+ function _installDependencies() {
149
+ return _installDependencies = _async_to_generator(function(projectRoot, packageManager) {
150
+ var options, yarn;
151
+ return _ts_generator(this, function(_state) {
152
+ switch (_state.label) {
153
+ case 0:
154
+ return options = {
155
+ cwd: projectRoot
156
+ }, packageManager !== "yarn" ? [
157
+ 3,
158
+ 2
159
+ ] : (yarn = new PackageManager.YarnPackageManager(options), [
160
+ 4,
161
+ yarn.installAsync()
162
+ ]);
163
+ case 1:
164
+ return _state.sent(), [
165
+ 3,
166
+ 4
167
+ ];
168
+ case 2:
169
+ return [
170
+ 4,
171
+ new PackageManager.NpmPackageManager(options).installAsync()
172
+ ];
173
+ case 3:
174
+ _state.sent(), _state.label = 4;
175
+ case 4:
176
+ return [
177
+ 2
178
+ ];
179
+ }
180
+ });
181
+ }), _installDependencies.apply(this, arguments);
182
+ }
183
+ // Annotate the CommonJS export names for ESM import in node:
184
+ 0 && (module.exports = {
185
+ installDependencies
186
+ });
187
+ //# sourceMappingURL=installDependencies.js.map
@@ -0,0 +1,6 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/helpers/Users/n8/vxrn/packages/create-vxrn/src/helpers/installDependencies.ts"],
4
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qBAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEhC,SAAsBA,oBACpBC,aACAC,gBAA+C;SAF3BF,qBAAAA,MAAAA,MAAAA,SAAAA;;SAAAA,uBAAAA;AAAAA,gCAAf,oBAAA,SACLC,aACAC,gBAA+C;QAEzCC,SAEEC;;;;iBAFFD,UAAU;YAAEE,KAAKJ;UAAY,GAC/BC,mBAAmB,SAAnBA;;;eACIE,OAAO,IAAIE,eAAeC,mBAAmBJ,OAAAA,GACnD;;YAAMC,KAAKI,aAAY;;;AAAvB,wBAAA,KAAA;;;;;AAEA,iBAAA;;YAAM,IAAIF,eAAeG,kBAAkBN,OAAAA,EAASK,aAAY;;;AAAhE,iBAAA,KAAA;;;;;;;EAEJ,CAAA,GAXsBR,qBAAAA,MAAAA,MAAAA,SAAAA;;",
5
+ "names": ["installDependencies", "projectRoot", "packageManager", "options", "yarn", "cwd", "PackageManager", "YarnPackageManager", "installAsync", "NpmPackageManager"]
6
+ }