@zerct/zerct 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +1 -1
  2. package/bin/zerct.js +30 -14
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -17,5 +17,5 @@ npx zerct deploy
17
17
  Zerct expects `Cargo.toml`, `Cargo.lock`, and `zerct.toml`. The app must listen
18
18
  on `0.0.0.0:$PORT` and expose the configured health endpoint.
19
19
 
20
- Use `ZERCT_TOKEN` or `npx zerct login --token <token>` for authenticated
20
+ Use `ZERCT_TOKEN` or `npx @zerct/zerct login --token <token>` for authenticated
21
21
  commands.
package/bin/zerct.js CHANGED
@@ -4,11 +4,38 @@ import { existsSync, mkdirSync, readFileSync, readdirSync, statSync, writeFileSy
4
4
  import { homedir } from 'node:os'
5
5
  import path from 'node:path'
6
6
 
7
- const VERSION = '0.1.0'
7
+ const VERSION = '0.1.1'
8
8
  const DEFAULT_API_URL = 'https://api.zerct.com'
9
9
  const ARCHIVE_LIMIT_BYTES = 48 * 1024 * 1024
10
10
  const SESSION_DIR = '.zerct'
11
11
  const SESSION_FILE = 'session-token'
12
+ const ARCHIVE_EXCLUDES = [
13
+ '.git',
14
+ 'target',
15
+ 'node_modules',
16
+ '.zerct',
17
+ '.env',
18
+ '.env.*',
19
+ '.npmrc',
20
+ '.pypirc',
21
+ '.netrc',
22
+ '.ssh',
23
+ '.aws',
24
+ '.azure',
25
+ '.kube',
26
+ '.config/gcloud',
27
+ '*.pem',
28
+ '*.key',
29
+ '*.p12',
30
+ '*.pfx',
31
+ 'id_rsa',
32
+ 'id_ed25519',
33
+ '*.sqlite',
34
+ '*.sqlite3',
35
+ '*.db',
36
+ '*.log',
37
+ '.DS_Store'
38
+ ]
12
39
 
13
40
  const HELP = `Zerct ${VERSION}
14
41
 
@@ -416,19 +443,8 @@ function parseJson(text) {
416
443
  }
417
444
 
418
445
  function createArchiveBase64(projectDir) {
419
- const tar = spawnSync('tar', [
420
- '--exclude=.git',
421
- '--exclude=target',
422
- '--exclude=node_modules',
423
- '--exclude=.zerct',
424
- '--exclude=.env',
425
- '--exclude=.env.*',
426
- '-czf',
427
- '-',
428
- '-C',
429
- projectDir,
430
- '.'
431
- ], {
446
+ const excludeArgs = ARCHIVE_EXCLUDES.map((pattern) => `--exclude=${pattern}`)
447
+ const tar = spawnSync('tar', [...excludeArgs, '-czf', '-', '-C', projectDir, '.'], {
432
448
  encoding: 'buffer',
433
449
  maxBuffer: ARCHIVE_LIMIT_BYTES + 1024 * 1024
434
450
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zerct/zerct",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Deploy Rust backends to Zerct.",
5
5
  "type": "module",
6
6
  "bin": {