create-domis 1.0.38 → 1.0.39
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/index.js +9 -34
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -9,7 +9,7 @@ import extract from "extract-zip";
|
|
|
9
9
|
var API_VERIFY = "https://verifyprokey-rk2ogbbeja-uc.a.run.app";
|
|
10
10
|
var TIMEOUT_MS = 3e4;
|
|
11
11
|
var MAX_RETRIES = 2;
|
|
12
|
-
console.log(chalk.green.bold("\n\u{1F525} DomisPacks Technical v1.0.
|
|
12
|
+
console.log(chalk.green.bold("\n\u{1F525} DomisPacks Technical v1.0.39\n"));
|
|
13
13
|
function copyRecursive(src, dest) {
|
|
14
14
|
const stat = fs.lstatSync(src);
|
|
15
15
|
if (stat.isDirectory()) {
|
|
@@ -38,10 +38,7 @@ async function createFreePack(target) {
|
|
|
38
38
|
{
|
|
39
39
|
source: "**/*.@(js|css|woff2|png|jpg|jpeg|gif|svg|webp|ico)",
|
|
40
40
|
headers: [
|
|
41
|
-
{
|
|
42
|
-
key: "Cache-Control",
|
|
43
|
-
value: "public, max-age=31536000, immutable"
|
|
44
|
-
}
|
|
41
|
+
{ key: "Cache-Control", value: "public, max-age=31536000, immutable" }
|
|
45
42
|
]
|
|
46
43
|
},
|
|
47
44
|
{
|
|
@@ -71,10 +68,7 @@ async function createFreePack(target) {
|
|
|
71
68
|
version: "1.0.0",
|
|
72
69
|
private: true,
|
|
73
70
|
description: "DomisDocs Free",
|
|
74
|
-
scripts: {
|
|
75
|
-
dev: "echo - compre o Lite",
|
|
76
|
-
build: "echo nada"
|
|
77
|
-
}
|
|
71
|
+
scripts: { dev: "echo - compre o Lite", build: "echo nada" }
|
|
78
72
|
},
|
|
79
73
|
null,
|
|
80
74
|
2
|
|
@@ -113,10 +107,7 @@ async function verifyAndDownload(proKey, pack) {
|
|
|
113
107
|
headers: {
|
|
114
108
|
"Content-Type": "application/json"
|
|
115
109
|
},
|
|
116
|
-
body: JSON.stringify({
|
|
117
|
-
key: proKey,
|
|
118
|
-
pack
|
|
119
|
-
})
|
|
110
|
+
body: JSON.stringify({ key: proKey, pack })
|
|
120
111
|
});
|
|
121
112
|
const data = await res.json();
|
|
122
113
|
if (!data.valid) {
|
|
@@ -147,18 +138,9 @@ async function main() {
|
|
|
147
138
|
name: "pack",
|
|
148
139
|
message: "Qual pack voc\xEA quer acelerar hoje?",
|
|
149
140
|
choices: [
|
|
150
|
-
{
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
},
|
|
154
|
-
{
|
|
155
|
-
name: "\u{1F525} DomisDocs Lite \u2014 Next.js 15 + Tailwind v4 + Firebase",
|
|
156
|
-
value: "lite"
|
|
157
|
-
},
|
|
158
|
-
{
|
|
159
|
-
name: "\u{1F525} DomisDocs PRO \u2014 Next.js 15 + Stripe + Rules + SSR",
|
|
160
|
-
value: "pro"
|
|
161
|
-
}
|
|
141
|
+
{ name: "\u{1F525} DomisDocs Free - Configura\xE7\xE3o b\xE1sica Firebase", value: "free" },
|
|
142
|
+
{ name: "\u{1F525} DomisDocs Lite \u2014 Next.js 15 + SaaS Boilerplate", value: "lite" },
|
|
143
|
+
{ name: "\u{1F525} DomisDocs PRO \u2014 Next.js 15 + Stripe + Rules + SSR", value: "pro" }
|
|
162
144
|
]
|
|
163
145
|
},
|
|
164
146
|
{
|
|
@@ -188,10 +170,7 @@ async function main() {
|
|
|
188
170
|
}
|
|
189
171
|
const spinner = ora("Verificando PRO_KEY...").start();
|
|
190
172
|
try {
|
|
191
|
-
const downloadUrl = await verifyAndDownload(
|
|
192
|
-
answers.proKey,
|
|
193
|
-
answers.pack
|
|
194
|
-
);
|
|
173
|
+
const downloadUrl = await verifyAndDownload(answers.proKey, answers.pack);
|
|
195
174
|
spinner.text = `Baixando DomisDocs ${answers.pack.toUpperCase()}...`;
|
|
196
175
|
const zipTmp = path.join(os.tmpdir(), `domis-${Date.now()}.zip`);
|
|
197
176
|
const extractTmp = path.join(os.tmpdir(), `domis-extract-${Date.now()}`);
|
|
@@ -219,11 +198,7 @@ async function main() {
|
|
|
219
198
|
} catch (e) {
|
|
220
199
|
spinner.fail(chalk.red(`\u274C ${e.message}`));
|
|
221
200
|
if (e.message === "not_found" || e.message === "expired" || e.message === "inactive" || e.message === "upgrade_required") {
|
|
222
|
-
console.log(
|
|
223
|
-
chalk.yellow(
|
|
224
|
-
"\nVerifique sua chave em: https://domispacks.web.app/validar.html"
|
|
225
|
-
)
|
|
226
|
-
);
|
|
201
|
+
console.log(chalk.yellow("\nVerifique sua chave em: https://domispacks.web.app/validar.html"));
|
|
227
202
|
}
|
|
228
203
|
process.exit(1);
|
|
229
204
|
}
|
package/package.json
CHANGED