nestdotland / nest

[WIP] 🥚 Nest CLI
https://docs.nest.land/cli
MIT License
7 stars 2 forks source link

Config files (data.json module.json) #14

Closed SteelAlloy closed 3 years ago

SteelAlloy commented 4 years ago
// .nest/module.json

{
  "$schema": "https://nest.land/-/nest-cli/schema.json",

  "name": "mod",
  "full_name": "My Awesome Module",
  "description": "I swear my module is the best out there",
  "homepage": "https://my.awesome.module",
  "license": "LICENSE",

  "hooks": {
    "presync": "command",
    "postsync": "command",
    "prepack": "command",
    "postpack": "command",
    "prepublish": "command",
    "postpublish": "command",
    "preaudit": "command",
    "postaudit": "command"
  },

  "unlisted": false,
  "private": false
  // ...
}
// .nest/module.json interface
interface Module {
  $schema: string;

  name: string;
  fullName?: string; // default: `${name}`
  description?: string; // default: ""
  homepage?: string; // default: `https://nest.land/x/${user}/${module}`
  license?: string; // default: "UNKNOWN"

  hooks: {
    presync: string; // default: ""
    postsync: string; // default: ""
    prepack: string; // default: ""
    postpack: string; // default: ""
    prepublish: string; // default: ""
    postpublish: string; // default: ""
    preaudit: string; // default: ""
    postaudit: string; // default: ""
  };

  unlisted?: boolean; // default: false
  private?: boolean; // default: false
  // ...
}
// .nest/data.json

// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.

{
  "meta": {
    "name": "mod",
    "full_name": "My Awesome Module",
    "description": "I swear my module is the best out there",
    "homepage": "https://my.awesome.module",
    "license": "LICENSE",

    "hooks": {
      "presync": "command",
      "postsync": "command",
      "prepack": "command",
      "postpack": "command",
      "prepublish": "command",
      "postpublish": "command",
      "preaudit": "command",
      "postaudit": "command"
    },

    "unlisted": false,
    "private": false
    // ...
  },
  // cache the api for offline use
  "api": {
    "versions": ["1.0.0", "0.9.8", "0.9.7", "..."],
    "latestVersion": "1.0.0",
    "lastPublished": 1603171976111,
    "license": "MIT"
    // ...
  },
  "version": "1.0.0", // nest cli version
  "lastSync": 1602831956336,
  "nextAutoSync": 1602832005131
  // ...
}