lucy-cli 1.2.5 → 2.0.0-alpha.10
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/args.d.ts +7 -0
- package/dist/args.js +23 -0
- package/dist/commands.d.ts +3 -0
- package/dist/commands.js +18 -0
- package/dist/config.d.ts +20 -0
- package/dist/config.js +39 -0
- package/dist/error.d.ts +17 -0
- package/dist/error.js +5 -0
- package/dist/helpers.d.ts +1 -32
- package/dist/helpers.js +6 -261
- package/dist/index.d.ts +2 -59
- package/dist/index.js +25 -282
- package/dist/init.d.ts +4 -8
- package/dist/init.js +269 -158
- package/dist/params.d.ts +7 -0
- package/dist/params.js +23 -0
- package/dist/policy.d.ts +3 -0
- package/dist/policy.js +5 -0
- package/dist/prepare.d.ts +0 -8
- package/dist/prepare.js +20 -19
- package/dist/runtime.d.ts +5 -0
- package/dist/runtime.js +11 -0
- package/dist/schemas/index.d.ts +2 -0
- package/dist/schemas/index.js +2 -0
- package/dist/schemas/types.js +1 -0
- package/dist/states.d.ts +10 -0
- package/dist/states.js +7 -0
- package/files/expo/.nvmrc +1 -0
- package/files/expo/.prettierignore +23 -0
- package/files/expo/.prettierrc.js +16 -0
- package/files/expo/.yarnrc +1 -0
- package/files/expo/.yarnrc.yml +3 -0
- package/files/expo/README.md +45 -0
- package/files/expo/assets/fonts/SpaceMono-Regular.ttf +0 -0
- package/files/expo/assets/images/adaptive-icon.png +0 -0
- package/files/expo/assets/images/favicon.png +0 -0
- package/files/expo/assets/images/icon.png +0 -0
- package/files/expo/assets/images/splash-icon.png +0 -0
- package/files/expo/babel.config.js +10 -0
- package/files/expo/constants/theme.ts +18 -0
- package/files/expo/eas.json +32 -0
- package/files/expo/eslint.config.mjs +181 -0
- package/files/expo/global.css +47 -0
- package/files/expo/hooks/useColorScheme.ts +17 -0
- package/files/expo/index.ts +11 -0
- package/files/expo/lib/data.ts +48 -0
- package/files/expo/lib/utils/index.ts +11 -0
- package/files/expo/lib/utils/polyfills.ts +29 -0
- package/files/expo/lib/wix/client.ts +12 -0
- package/files/expo/lib/wix/error.ts +3 -0
- package/files/expo/lib/wix/index.ts +2 -0
- package/files/expo/lucy.json +8 -0
- package/files/expo/metro.config.js +57 -0
- package/files/expo/nativewind-env.d.ts +1 -0
- package/files/expo/scripts/reset-project.ts +116 -0
- package/files/expo/tailwind.config.js +63 -0
- package/files/expo/tsconfig.json +46 -0
- package/files/expo/types/reset.d.ts +1 -0
- package/files/velo/typescript/public/scss/app.scss +0 -0
- package/files/velo/typescript/styles/.gitkeep +0 -0
- package/files/velo/typescript/styles/global.scss +0 -0
- package/package.json +16 -12
- package/src/args.ts +36 -0
- package/src/commands.ts +21 -0
- package/src/config.ts +61 -0
- package/src/error.ts +4 -0
- package/src/helpers.ts +7 -305
- package/src/index.ts +29 -369
- package/src/init.ts +386 -177
- package/src/policy.ts +6 -0
- package/src/prepare.ts +19 -19
- package/src/runtime.ts +20 -0
- package/src/schemas/index.ts +3 -0
- package/src/schemas/types.ts +0 -0
- package/src/states.ts +15 -0
- package/src copy/helpers.ts +307 -0
- package/src copy/index.ts +379 -0
- package/src copy/init.ts +183 -0
- package/src copy/models.ts +35 -0
- package/src copy/prepare.ts +24 -0
- package/src copy/schemas/index.ts +0 -0
- package/src copy/schemas/types.ts +0 -0
- package/src copy/settings.json +67 -0
- package/src copy/types.d.ts +8 -0
- package/dist/Gulpfile.d.ts +0 -34
- package/dist/Gulpfile.js +0 -115
- package/dist/cli.d.ts +0 -2
- package/dist/cli.js +0 -44
- package/dist/dev.d.ts +0 -2
- package/dist/dev.js +0 -14
- package/dist/gulp/backend copy.d.ts +0 -4
- package/dist/gulp/backend copy.js +0 -50
- package/dist/gulp/backend.d.ts +0 -3
- package/dist/gulp/backend.js +0 -91
- package/dist/gulp/checks.d.ts +0 -3
- package/dist/gulp/checks.js +0 -204
- package/dist/gulp/clean copy.d.ts +0 -2
- package/dist/gulp/clean copy.js +0 -19
- package/dist/gulp/clean.d.ts +0 -3
- package/dist/gulp/clean.js +0 -28
- package/dist/gulp/copy.d.ts +0 -2
- package/dist/gulp/copy.js +0 -33
- package/dist/gulp/docs.d.ts +0 -2
- package/dist/gulp/docs.js +0 -27
- package/dist/gulp/helpers.d.ts +0 -2
- package/dist/gulp/helpers.js +0 -24
- package/dist/gulp/pages copy.d.ts +0 -3
- package/dist/gulp/pages copy.js +0 -22
- package/dist/gulp/pages.d.ts +0 -2
- package/dist/gulp/pages.js +0 -36
- package/dist/gulp/pipeline.d.ts +0 -1
- package/dist/gulp/pipeline.js +0 -28
- package/dist/gulp/public.d.ts +0 -2
- package/dist/gulp/public.js +0 -49
- package/dist/gulp/styles.d.ts +0 -2
- package/dist/gulp/styles.js +0 -39
- package/dist/gulp/templates.d.ts +0 -2
- package/dist/gulp/templates.js +0 -32
- package/dist/gulp/test.d.ts +0 -2
- package/dist/gulp/test.js +0 -26
- package/dist/gulp/types.d.ts +0 -4
- package/dist/gulp/types.js +0 -288
- package/dist/gulp/watchers.d.ts +0 -9
- package/dist/gulp/watchers.js +0 -58
- package/dist/init copy.d.ts +0 -8
- package/dist/init copy.js +0 -167
- package/dist/install.d.ts +0 -2
- package/dist/install.js +0 -53
- package/dist/settings.json +0 -67
- package/dist/start_gulp.d.ts +0 -2
- package/dist/start_gulp.js +0 -14
- package/dist/sync.d.ts +0 -2
- package/dist/sync.js +0 -87
- /package/{files/.gitmodules → dist/schemas/types.d.ts} +0 -0
- /package/files/{typescript/__mocks__ → expo/components}/.gitkeep +0 -0
- /package/files/{typescript/pages → expo/components/ui}/.gitkeep +0 -0
- /package/files/{typescript/backend/data.ts → velo/.gitmodules} +0 -0
- /package/files/{.madgerc → velo/.madgerc} +0 -0
- /package/files/{.nvmrc → velo/.nvmrc} +0 -0
- /package/files/{.stylelintrc.js → velo/.stylelintrc.js} +0 -0
- /package/files/{.yarnrc.yml → velo/.yarnrc.yml} +0 -0
- /package/files/{currents.config.js → velo/currents.config.js} +0 -0
- /package/files/{cypress → velo/cypress}/e2e/base/base.cy.ts +0 -0
- /package/files/{cypress → velo/cypress}/fixtures/example.json +0 -0
- /package/files/{cypress → velo/cypress}/support/commands.ts +0 -0
- /package/files/{cypress → velo/cypress}/support/e2e.ts +0 -0
- /package/files/{cypress → velo/cypress}/tsconfig.json +0 -0
- /package/files/{cypress.config.mjs → velo/cypress.config.mjs} +0 -0
- /package/files/{eslint.config.mjs → velo/eslint.config.mjs} +0 -0
- /package/files/{local.tsconfig.json → velo/local.tsconfig.json} +0 -0
- /package/files/{typedoc.json → velo/typedoc.json} +0 -0
- /package/files/{typescript/public → velo/typescript/__mocks__}/.gitkeep +0 -0
- /package/files/{typescript/backend/events.ts → velo/typescript/backend/data.ts} +0 -0
- /package/files/{typescript/public/scss/app.scss → velo/typescript/backend/events.ts} +0 -0
- /package/files/{typescript → velo/typescript}/backend/http-functions.ts +0 -0
- /package/files/{typescript → velo/typescript}/backend/lib/http-functions/sync.ts +0 -0
- /package/files/{typescript → velo/typescript}/backend/permissions.json +0 -0
- /package/files/{typescript/styles → velo/typescript/pages}/.gitkeep +0 -0
- /package/files/{typescript/styles/global.scss → velo/typescript/public/.gitkeep} +0 -0
- /package/files/{typescript → velo/typescript}/tsconfig.json +0 -0
- /package/files/{vitest.config.ts → velo/vitest.config.ts} +0 -0
- /package/{src → src copy}/Gulpfile.ts +0 -0
- /package/{src → src copy}/gulp/backend.ts +0 -0
- /package/{src → src copy}/gulp/checks.ts +0 -0
- /package/{src → src copy}/gulp/clean.ts +0 -0
- /package/{src → src copy}/gulp/copy.ts +0 -0
- /package/{src → src copy}/gulp/helpers.ts +0 -0
- /package/{src → src copy}/gulp/pages.ts +0 -0
- /package/{src → src copy}/gulp/pipeline.ts +0 -0
- /package/{src → src copy}/gulp/public.ts +0 -0
- /package/{src → src copy}/gulp/styles.ts +0 -0
- /package/{src → src copy}/gulp/templates.ts +0 -0
- /package/{src → src copy}/gulp/types.ts +0 -0
- /package/{src → src copy}/gulp/watchers.ts +0 -0
- /package/{src → src copy}/sync.ts +0 -0
package/dist/start_gulp.d.ts
DELETED
package/dist/start_gulp.js
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
// https://www.sergevandenoever.nl/run-gulp4-tasks-programatically-from-node/
|
2
|
-
import path from 'path';
|
3
|
-
import { fileURLToPath } from 'url';
|
4
|
-
export async function dev(moduleSettings, projectSettings, task) {
|
5
|
-
// Get the directory name of the current module
|
6
|
-
const __filename = fileURLToPath(import.meta.url);
|
7
|
-
const __dirname = path.dirname(__filename);
|
8
|
-
// Resolve the path to the Gulpfile
|
9
|
-
const gulpfilePath = path.resolve(__dirname, 'Gulpfile.js');
|
10
|
-
// Dynamically import the Gulpfile
|
11
|
-
const gulpfile = await import(`file://${gulpfilePath}`);
|
12
|
-
// Check if 'dev' task exists
|
13
|
-
gulpfile.runTask('dev', moduleSettings, projectSettings);
|
14
|
-
}
|
package/dist/sync.d.ts
DELETED
package/dist/sync.js
DELETED
@@ -1,87 +0,0 @@
|
|
1
|
-
import chalk from "chalk";
|
2
|
-
import { green, orange, red } from "./index.js";
|
3
|
-
import readline from 'node:readline';
|
4
|
-
import veloAPI from 'velo-sync/dist/velo/velo-api.js';
|
5
|
-
import syncTask from 'velo-sync/dist/tasks/sync-task.js';
|
6
|
-
import { readConfig, saveConfig } from "./helpers.js";
|
7
|
-
import optimist from 'optimist';
|
8
|
-
import migrateFileCache from 'velo-sync/dist/tasks/migrate-files-cache-task.js';
|
9
|
-
function printUsage() {
|
10
|
-
console.log('Usage: ');
|
11
|
-
console.log('');
|
12
|
-
console.log('Commands:');
|
13
|
-
console.log(' init generates a config file for the import / export / sync process');
|
14
|
-
console.log(' is-alive tests the config and the connection to the site');
|
15
|
-
console.log(' sync runs the sync process');
|
16
|
-
console.log(' import runs an import process');
|
17
|
-
console.log(' migrate migrate existing nedb cache to sqlite cache (.upload-cache.db => .upload-cache.sqlite.db)');
|
18
|
-
}
|
19
|
-
function syncOrImportTask(importOnly) {
|
20
|
-
let argv = optimist
|
21
|
-
.usage(`Usage: $0 ${importOnly ? 'import' : 'sync'} -f <scv filename> -c <collection>`)
|
22
|
-
.demand('f')
|
23
|
-
.alias('f', 'filename')
|
24
|
-
.describe('f', 'csv filename to import')
|
25
|
-
.demand('c')
|
26
|
-
.describe('c', 'the name of the collection to import into')
|
27
|
-
.alias('c', 'collection')
|
28
|
-
.demand('s')
|
29
|
-
.describe('s', 'schema file describing the fields of the collection')
|
30
|
-
.alias('s', 'schema')
|
31
|
-
.describe('dry', 'dry-run that does not upload any data or files, and does not remove or update anything on the site')
|
32
|
-
.alias('dry', 'dryrun')
|
33
|
-
.parse(process.argv.slice(3));
|
34
|
-
let filename = argv.filename;
|
35
|
-
let collection = argv.collection;
|
36
|
-
let schema = argv.schema;
|
37
|
-
let dryrun = argv.dryrun;
|
38
|
-
//@ts-ignore
|
39
|
-
syncTask.default(filename, collection, schema, importOnly, dryrun);
|
40
|
-
}
|
41
|
-
export async function sync(moduleSettings, projectSettings) {
|
42
|
-
if (moduleSettings.args.includes('-h') || moduleSettings.args.includes('help'))
|
43
|
-
return printUsage();
|
44
|
-
if (moduleSettings.args.includes('init')) {
|
45
|
-
const rl = readline.createInterface({
|
46
|
-
input: process.stdin,
|
47
|
-
output: process.stdout,
|
48
|
-
terminal: true
|
49
|
-
});
|
50
|
-
async function askQuestion(query) {
|
51
|
-
return new Promise((resolve) => rl.question(query, (answer) => resolve(answer)));
|
52
|
-
}
|
53
|
-
console.log(chalk.yellow('hello to velo-sync init'));
|
54
|
-
let siteUrl = await askQuestion(orange('what is the url of the site homepage? '));
|
55
|
-
let secret = await askQuestion(orange('what is the velo-sync secret? '));
|
56
|
-
rl.close();
|
57
|
-
let config = { siteUrl, secret };
|
58
|
-
await saveConfig(config, moduleSettings.veloConfigName);
|
59
|
-
return console.log(chalk.green("🐕" + ' => config saved!'));
|
60
|
-
}
|
61
|
-
if (moduleSettings.args.includes('is-alive')) {
|
62
|
-
try {
|
63
|
-
let config = await readConfig(moduleSettings.veloConfigName);
|
64
|
-
console.log("🐕" + green(` => checking if the API for site ${chalk.greenBright(config.siteUrl)} is alive...`));
|
65
|
-
await veloAPI.isAlive(config);
|
66
|
-
return console.log(chalk.green("🐕" + ` => API of site ${chalk.greenBright(config.siteUrl)} is working and alive!!!`));
|
67
|
-
}
|
68
|
-
catch (e) {
|
69
|
-
if (e instanceof Error) {
|
70
|
-
return console.log((`💩 ${red.underline.bold("=> Failed to check endpoint")} ${orange(e.message)}`));
|
71
|
-
}
|
72
|
-
}
|
73
|
-
}
|
74
|
-
if (moduleSettings.args.includes('sync')) {
|
75
|
-
return syncOrImportTask(false);
|
76
|
-
}
|
77
|
-
if (moduleSettings.args.includes('import')) {
|
78
|
-
return syncOrImportTask(true);
|
79
|
-
}
|
80
|
-
if (moduleSettings.args.includes('export')) {
|
81
|
-
return console.log((`💩 ${red.underline.bold("=> Not implemented")}`));
|
82
|
-
}
|
83
|
-
if (moduleSettings.args.includes('migrate')) {
|
84
|
-
//@ts-ignore
|
85
|
-
migrateFileCache.default();
|
86
|
-
}
|
87
|
-
}
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|