Code Monkey home page Code Monkey logo

eggs's Introduction


logo

Eggs CLI

The CLI used to publish and update modules in nest.land.

nest.land badge Eggs lint Eggs test Eggs ship Discord

Contents

Installation

Note: You need to upgrade to Deno v1.6.0 or newer in order to use our CLI.

deno install -Afq --unstable https://x.nest.land/[email protected]/eggs.ts

For more information, see the documentation.

List Of Commands

Link

Before publishing a package to our registry, you'll need to get an API key. Visit nest.land to generate one.

Then, use link to add it to the CLI:

eggs link <key>

Alternatively, you can manually create a .nest-api-key file at your user home directory.

Init

To publish a package, you need to create an egg.json file at the root of your project as well. To do this easily, type:

eggs init

Note: If you'd like to specify a version that you'll publish to, you can include a version variable in egg.json.

Publish

After you've filled in the information located in egg.json, you can publish your package to our registry with this command:

eggs publish

You'll receive a link to your package on our registry, along with an import URL for others to import your package from the Arweave blockchain!

Note: It may take some time for the transaction to process in Arweave. Until then, we upload your files to our server, where they are served for 20 minutes to give the transaction time to process.

Update

You can easily update your dependencies and global scripts with the update command.

eggs update [deps] <options>

Your dependencies are by default checked in the deps.ts file (current working directory). You can change this with --file

eggs update # default to deps.ts
eggs update --file dependencies.ts

In regular mode, all your dependencies are updated. You can choose which ones will be modified by adding them as arguments.

eggs update # Updates everything
eggs update http fs eggs # Updates only http, fs, eggs

Several registries are supported. The current ones are:

  • x.nest.land
  • deno.land/x
  • deno.land/std
  • raw.githubusercontent.com
  • denopkg.com

If you want to add a registry, open an issue by specifying the registry url and we'll add it.

An example of updated file:

import * as colors from "https://deno.land/[email protected]/fmt/colors.ts";
import * as bcrypt from "https://deno.land/x/[email protected]/mod.ts";
import * as eggs from "https://x.nest.land/[email protected]/mod.ts";
import * as http from "https://deno.land/std/http/mod.ts";

After eggs update:

import * as colors from "https://deno.land/[email protected]/fmt/colors.ts";
import * as bcrypt from "https://deno.land/x/[email protected]/mod.ts";
import * as eggs from "https://x.nest.land/[email protected]/mod.ts";
import * as http from "https://deno.land/std/http/mod.ts";

Install

Just like deno install, you can install scripts globally with eggs. By installing it this way, you will be notified if an update is available for your script.

The verification is smart, it can't be done more than once a day. To install a script, simply replace deno with eggs.

deno install --allow-write --allow-read -n [NAME] https://x.nest.land/[MODULE]@[VERSION]/cli.ts

Becomes

eggs install --allow-write --allow-read -n [NAME] https://x.nest.land/[MODULE]@[VERSION]/cli.ts

The supported registries are the same as for the update command.

Upgrade

To upgrade the eggs CLI, use the command shown:

eggs upgrade

Contributing

All contributions are welcome! If you can think of a command or feature that might benefit nest.land, fork this repository and make a pull request from your branch with the additions. Make sure to use Conventional Commits

Contribution guide

eggs's People

Contributors

buttercubz avatar ebebbington avatar martonlederer avatar maximousblk avatar moncefplastin07 avatar notfilippo avatar steelalloy avatar t8 avatar tttie avatar zorbyte avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

eggs's Issues

Setting multiple `ignore` entries disables `ignore` feature entirely

πŸ› Bug Report

ignore field doesn't work if there are two (or more?) entries.

To Reproduce

  1. In egg.yml, set files and ignore fields like this:

    files:
      - ./**/*.ts
    ignore:
      - ./node_modules/**/*
      - ./tests/**/*
    
  2. Run eggs publish --dry-run

Expected behavior

It excludes all files under ./node_modules and ./tests directory from the published bundle.

Actual Behavior

It lists up the files under ./node_modules and ./tests.

Environment

  • Eggs version: 0.3.8

  • Deno version: 1.14.0 (release, aarch64-apple-darwin)

  • Operating system and version:

    macOS 11.5.2
    CPU: (8) arm64 Apple M1
    

Additional context

Note that setting a single entry to ignore works expectedly.

Optional Additional Feature to simplify "multiple registry" module publishing

I think it is already great to have "eggs publish" + the GitHub Action for simple publishing to nest.land

I'm just wondering whether it would be an additional boost if we added the option to publish in the deno.land style via webhooks / releases.

Background: Most module developers will imo publish on deno.land PLUS on nest.land ...

Perhaps Luca, Ryan and William would even consider adding an optional hint here - see screenshot:
Screen Shot 2020-09-12 at 6 26 13 PM

The hint could look like. If you want to additionally publish your module on nest.land add another webhook named:
...

Support import maps and/or add "dependenciesFile" key to config

πŸš€ Feature

Add support for import maps like Deno does, more specifically to the eggs update command. There may be other commands that could profit from this too.

Motivation

I don't use Typescript or even JavaScript module files, instead I use a modules.json file as an import map, which is supported by Deno (and Chrome I think) and will be (fingers crossed) standard soon. There is currently no way for me to update my dependencies through the eggs CLI, unless I switch to a .ts or .js file.

Implementation

A simple and hopefully fast solution would be to add JSON support to the eggg update command, more specifically to the --file option.

But I personally think it would be good to add a key like dependenciesFile to the egg config schema, so one doesn't have to use the --file option every time they want to update their dependencies just because they named their dependencies file something other than the default (and - to be fair - opinionated) "deps.ts".

Alternatives

I think dependenciesFile is a descriptive, but pretty long key. However, I couldn't come up with a better key yet, dependencies for example seems to vague, just file seems misleading, which is why I would also suggest to change the name of the CLI option. Maybe depFile? importsFile? modulesFile?

Validate that the package can be correctly installed

Is your feature request related to a problem? If so, please describe.
Especially when publishing global scripts, it is easy to miss files in the egg.json, whether due to simple forgetting, file renames etc.

Describe the solution you'd like
A validate subcommand that verfies that the package defined in eggs.json can be correctly installed would be helpful to test the package manually (or automatially) before publishing.

The technical details should be further discussed, but some sort of simulated installation would be a good general directon.

Describe alternatives you've considered
This could also be a flag to the publish command.

[BUG] Progress bar after publishing

Describe the bug
It appears that the progress bar on macOS is left incomplete and positioned in the wrong place after a publishing job is complete.

To Reproduce
eggs publish

Expected behavior
The progress bar should be placed above the confirmation text and appear as 100% after publishing

Screenshots
image

Desktop (please complete the following information):

  • OS: macOS
  • nest.land Version: 0.1.9 (the latest version that hasn't been published to nest.land yet)

Eggs Setting `stable` to false, where it's set to true in config

πŸ› Bug Report

My config file:

{
  "releaseType": "minor",
  "ignore": [
    ".git"
  ],
  "name": "data_format_converter",
  "description": "Data Format Converter for Deno: XML, JSON, CSV",
  "version": "1.2.0",
  "stable": true,
  "homepage": "https://github.com/ebebbington/data-format-converter",
  "files": [
    "./mod.ts",
    "./dfc-logo.png",
    "./LICENSE",
    "./src/*.ts",
    "./README.md"
  ],
  "entry": "./mod.ts",
  "checkAll": false,
  "unlisted": false
}

Result from eggs:

Edwards-MacBook-Pro:data-format-converter edwardbebbington$ eggs publish
- [INFO] Source files are formatted.
- [INFO] Tests passed successfully.
- [INFO] No errors detected when installing the module.
[INFO] The resulting module is: 
        - name: "data_format_converter",
        - version: "1.3.0",
        - description: "Data Format Converter for Deno: XML, JSON, CSV",
        - repository: "https://github.com/ebebbington/data-format-converter",
        - unlisted: false,
        - stable: false,

Notice stable is false

To Reproduce

Unsure how someone else would reproduce this :S But all the info is above or below

Expected behavior

The stable prop. should be true

Actual Behavior

The stable prop is being set to false

Environment

  • Eggs version: 0.3.1
  • Deno version: 1.4.6
  • Operating system and version: MacOS High Sierra 10.13.6

Problem in output of `eggs info`

πŸ› Bug Report

When the dependency includes the items in next.land, the output of eggs info looks broken on macOS:

γ‚Ήγ‚―γƒͺγƒΌγƒ³γ‚·γƒ§γƒƒγƒˆ 2021-02-09 11 05 17

To Reproduce

Run eggs info https://x.nest.land/[email protected]/mod.ts

Expected behavior

The background color is not yellow.

Actual Behavior

The background color is yellow.

Environment

  • Eggs version: 0.3.4
  • Deno version: 1.7.0
  • Operating system and version: macOS 10.15.7

Eggs 0.3.1 broke with Deno 1.5.0

πŸ› Bug Report

error: TS2345 [ERROR]: Argument of type 'import("https://x.nest.land/[email protected]/log/logger.ts").LogRecord' is not assignable to parameter of type 'import("https://nghbeaead2s4n5znqogrk627qxhfdfterapmd3orofnyqlfusora.arweave.net/aY4SAIAepcb3LYONFXtfhc5RlmSIHsHt0XFbiCy0k6I/log/logger.ts").LogRecord'.
  Property '#args' in type 'LogRecord' refers to a different member that cannot be accessed from within type 'LogRecord'.
      handler.handle(record);
                     ~~~~~~
    at https://x.nest.land/[email protected]/log/logger.ts:116:22

TS2416 [ERROR]: Property 'format' in type 'ConsoleHandler' is not assignable to the same property in base type 'BaseHandler'.
  Type '(logRecord: import("https://x.nest.land/[email protected]/log/logger.ts").LogRecord) => string' is not assignable to type '(logRecord: import("https://nghbeaead2s4n5znqogrk627qxhfdfterapmd3orofnyqlfusora.arweave.net/aY4SAIAepcb3LYONFXtfhc5RlmSIHsHt0XFbiCy0k6I/log/logger.ts").LogRecord) => string'.
    Types of parameters 'logRecord' and 'logRecord' are incompatible.
      Type 'import("https://nghbeaead2s4n5znqogrk627qxhfdfterapmd3orofnyqlfusora.arweave.net/aY4SAIAepcb3LYONFXtfhc5RlmSIHsHt0XFbiCy0k6I/log/logger.ts").LogRecord' is not assignable to type 'import("https://x.nest.land/[email protected]/log/logger.ts").LogRecord'.
        Property '#args' in type 'LogRecord' refers to a different member that cannot be accessed from within type 'LogRecord'.
  format(logRecord: LogRecord): string {
  ~~~~~~
    at file:///C:/Users/maela/code/gh/nestdotland/eggs/src/utilities/log.ts:35:3

TS2416 [ERROR]: Property 'format' in type 'FileHandler' is not assignable to the same property in base type 'BaseHandler'.
  Type '(logRecord: import("https://x.nest.land/[email protected]/log/logger.ts").LogRecord) => string' is not assignable to type '(logRecord: import("https://nghbeaead2s4n5znqogrk627qxhfdfterapmd3orofnyqlfusora.arweave.net/aY4SAIAepcb3LYONFXtfhc5RlmSIHsHt0XFbiCy0k6I/log/logger.ts").LogRecord) => string'.
    Types of parameters 'logRecord' and 'logRecord' are incompatible.
      Type 'import("https://nghbeaead2s4n5znqogrk627qxhfdfterapmd3orofnyqlfusora.arweave.net/aY4SAIAepcb3LYONFXtfhc5RlmSIHsHt0XFbiCy0k6I/log/logger.ts").LogRecord' is not assignable to type 'import("https://x.nest.land/[email protected]/log/logger.ts").LogRecord'.
  format(logRecord: LogRecord): string {
  ~~~~~~
    at file:///C:/Users/maela/code/gh/nestdotland/eggs/src/utilities/log.ts:77:3

TS2322 [ERROR]: Type 'ConsoleHandler' is not assignable to type 'BaseHandler'.
  Types of property 'format' are incompatible.
    Type '(logRecord: import("https://x.nest.land/[email protected]/log/logger.ts").LogRecord) => string' is not assignable to type '(logRecord: import("https://nghbeaead2s4n5znqogrk627qxhfdfterapmd3orofnyqlfusora.arweave.net/aY4SAIAepcb3LYONFXtfhc5RlmSIHsHt0XFbiCy0k6I/log/logger.ts").LogRecord) => string'.
      Types of parameters 'logRecord' and 'logRecord' are incompatible.
        Type 'import("https://nghbeaead2s4n5znqogrk627qxhfdfterapmd3orofnyqlfusora.arweave.net/aY4SAIAepcb3LYONFXtfhc5RlmSIHsHt0XFbiCy0k6I/log/logger.ts").LogRecord' is not assignable to type 'import("https://x.nest.land/[email protected]/log/logger.ts").LogRecord'.
      console: new ConsoleHandler(debugEnabled ? "DEBUG" : "INFO"),
      ~~~~~~~
    at file:///C:/Users/maela/code/gh/nestdotland/eggs/src/utilities/log.ts:122:7

TS2322 [ERROR]: Type 'FileHandler' is not assignable to type 'BaseHandler'.
  Types of property 'format' are incompatible.
    Type '(logRecord: import("https://x.nest.land/[email protected]/log/logger.ts").LogRecord) => string' is not assignable to type '(logRecord: import("https://nghbeaead2s4n5znqogrk627qxhfdfterapmd3orofnyqlfusora.arweave.net/aY4SAIAepcb3LYONFXtfhc5RlmSIHsHt0XFbiCy0k6I/log/logger.ts").LogRecord) => string'.
      Types of parameters 'logRecord' and 'logRecord' are incompatible.
        Type 'import("https://nghbeaead2s4n5znqogrk627qxhfdfterapmd3orofnyqlfusora.arweave.net/aY4SAIAepcb3LYONFXtfhc5RlmSIHsHt0XFbiCy0k6I/log/logger.ts").LogRecord' is not assignable to type 'import("https://x.nest.land/[email protected]/log/logger.ts").LogRecord'.
      file: new FileHandler("DEBUG"),
      ~~~~
    at file:///C:/Users/maela/code/gh/nestdotland/eggs/src/utilities/log.ts:123:7

Found 5 errors.

To Reproduce

Install deno 1.5.0

Environment

  • Eggs version: 0.3.1
  • Deno version: 1.5.0
  • Operating system and version: Windows 10, Ubuntu 20.04

Additional context

This bug is particularly tough, help is wanted.

feat: deprecate the stable field and enforce semver

Is your feature request related to a problem? If so, please describe.
There's no use in setting the stable field configuration by hand.

Describe the solution you'd like
eggs should remove the ability to set the stability manually. It should be detected by the it's semantic version. As they have a specification for what is called stable or unstable/a pre-release.

[egg.json] inconsistent configuration info in schema.json and docs.nest.land

The official schema.json file (0.3.10) lists the properties bump and checkAll.

However, on the docs.nest.land page neither of those fields are mentioned. The documentation instructs us to use releaseType and check. Which one is it?

Assuming one of the mentioned pairs is deprecated (as opposed to a crazy typo), I feel like the schema.json file should reflect the previous version as deprecated, making a reference to the current property names that should be used. The documentation site should do the same.

It's frustrating that I have to currently have to include both versions of the aforementioned properties, since I have not the slightest clue which is deprecated and which is current. I'm sure I can't be the only user affected by this.

Thank you.

[CRIT] An unexpected error occurred: "unacceptable kind of an object to dump [object Undefined] "

πŸ› Bug Report

When I try to initialize a project with YAML config I get this error:

 ? Config format:  (JSON) β€Ί YAML
[CRIT] An unexpected error occurred: "unacceptable kind of an object to dump [object Undefined] "
[INFO] Debug file created. (/home/v1rtl/Coding/deno-libs/node-http/eggs-debug.log)
[INFO] If you think this is a bug, please open a bug report at https://github.com/nestdotland/eggs/issues/new/choose with the information provided in /home/v1rtl/Coding/deno-libs/node-http/eggs-debug.log
[INFO] Visit https://docs.nest.land/eggs/ for documentation about this command.

To Reproduce

  1. Installs eggs CLI
  2. Clone https://github.com/deno-libs/node-http
  3. run eggs init

Expected behavior

it should work the same as with JSON format (that works fine)

Actual Behavior

right after the last question in eggs init it throws an error

Environment

  • Eggs version: 0.3.6
  • Deno version: 1.10.2
  • Operating system and version: Linux 5.10.34

Additional context

eggs-debug.log:

Arguments:
  init

Deno version:
  deno: 1.10.2
  v8: 9.1.269.27
  typescript: 4.2.2

Eggs version:
  0.3.6

Platform:
  x86_64-unknown-linux-gnu

2021-05-24T14:48:17.735Z [DEBUG]    Config:  {
  "$schema": "https://x.nest.land/[email protected]/src/schema.json",
  name: "node_http",
  entry: "mod.ts",
  description: "Node.js-like HTTP server for Deno. Makes porting web things from Node (a little bit) easier.",
  homepage: "https://github.com/deno-libs/node-http",
  version: "0.0.5",
  releaseType: undefined,
  unstable: undefined,
  unlisted: undefined,
  files: [ "README.md", "mod.ts" ],
  ignore: [],
  checkFormat: false,
  checkTests: false,
  checkInstallation: false,
  check: false
} "yml"
2021-05-24T14:48:17.777Z [CRITICAL] An unexpected error occurred: "unacceptable kind of an object to dump [object Undefined] " "YAMLError: unacceptable kind of an object to dump [object Undefined] \n    at writeNode (https://hsfsnm7udm3pieto2djpc3d4ddwbhggrgsbc7thjikze6nt35ruq.arweave.net/PIsms_QbNvQSbtDS8Wx8GOwTmNE0gi_M6UKyTzZ77Gk/encoding/_yaml/dumper/dumper.ts:826:13)\n    at writeBlockMapping (https://hsfsnm7udm3pieto2djpc3d4ddwbhggrgsbc7thjikze6nt35ruq.arweave.net/PIsms_QbNvQSbtDS8Wx8GOwTmNE0gi_M6UKyTzZ77Gk/encoding/_yaml/dumper/dumper.ts:681:10)\n    at writeNode (https://hsfsnm7udm3pieto2djpc3d4ddwbhggrgsbc7thjikze6nt35ruq.arweave.net/PIsms_QbNvQSbtDS8Wx8GOwTmNE0gi_M6UKyTzZ77Gk/encoding/_yaml/dumper/dumper.ts:797:9)\n    at dump (https://hsfsnm7udm3pieto2djpc3d4ddwbhggrgsbc7thjikze6nt35ruq.arweave.net/PIsms_QbNvQSbtDS8Wx8GOwTmNE0gi_M6UKyTzZ77Gk/encoding/_yaml/dumper/dumper.ts:893:7)\n    at stringify (https://hsfsnm7udm3pieto2djpc3d4ddwbhggrgsbc7thjikze6nt35ruq.arweave.net/PIsms_QbNvQSbtDS8Wx8GOwTmNE0gi_M6UKyTzZ77Gk/encoding/_yaml/stringify.ts:20:10)\n    at writeConfig (https://re4puumiydm7ktehlneont2f3khlb6tvjj6r7drpq6jvovt4lgpa.arweave.net/iTj6UYjA2fVMh1tI5s9F2o6w-nVKfR-OL4eTV1Z8WZ4/src/context/config.ts:83:52)\n    at Command.init [as fn] (https://re4puumiydm7ktehlneont2f3khlb6tvjj6r7drpq6jvovt4lgpa.arweave.net/iTj6UYjA2fVMh1tI5s9F2o6w-nVKfR-OL4eTV1Z8WZ4/src/commands/init.ts:187:9)\n    at async Command.execute (https://bcolxl2pfbbbdl7s4t5a3rmxcbu3iwgzvszraewcf6xmotdnvmda.arweave.net/CJy7r08oQhGv8uT6DcWXEGm0WNmssxASwi-ux0xtqwY/command/command.ts:973:7)\n    at async Command.parse (https://bcolxl2pfbbbdl7s4t5a3rmxcbu3iwgzvszraewcf6xmotdnvmda.arweave.net/CJy7r08oQhGv8uT6DcWXEGm0WNmssxASwi-ux0xtqwY/command/command.ts:896:16)\n    at async Command.parse (https://bcolxl2pfbbbdl7s4t5a3rmxcbu3iwgzvszraewcf6xmotdnvmda.arweave.net/CJy7r08oQhGv8uT6DcWXEGm0WNmssxASwi-ux0xtqwY/command/command.ts:848:16)"

I think it happens because of some of those fields being undefined

Add referral to GitHub Discussions after successful publish

I think it would be nice if we could print a short sentence telling the user to go post about their newly published module on our GitHub Discussions tab. This way, the user could talk about their module while also seeing more of our community and contributing to its growth.

Maybe the sentence would look something like:

Now you can showcase your module on our GitHub Discussions!
https://github.com/nestdotland/nest.land/discussions

Property 'prompts' is used before its initialization.

πŸ› Bug Report

Whenever I run eggs command I get this:

error: TS2729 [ERROR]: Property 'prompts' is used before its initialization.
  private names: string[] = this.prompts.map((prompt) => prompt.name);
                                 ~~~~~~~
    at https://xqalpbanzpdlq4nxt35ywjwpm6xwayfdny3pnikd4cp2ozmyl3xa.arweave.net/vAC3hA3Lxrhxt577iybPZ69gYKNuNvahQ-Cfp2WYXu4/prompt/prompt.ts:2010:34

    'prompts' is declared here.
        private prompts: PromptOptions<string, any, any>[],
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        at https://xqalpbanzpdlq4nxt35ywjwpm6xwayfdny3pnikd4cp2ozmyl3xa.arweave.net/vAC3hA3Lxrhxt577iybPZ69gYKNuNvahQ-Cfp2WYXu4/prompt/prompt.ts:2018:5

~ via ⬒ v15.12.0 via 🐍 v3.9.2 
➜ eggs update
error: TS2729 [ERROR]: Property 'prompts' is used before its initialization.
  private names: string[] = this.prompts.map((prompt) => prompt.name);
                                 ~~~~~~~
    at https://xqalpbanzpdlq4nxt35ywjwpm6xwayfdny3pnikd4cp2ozmyl3xa.arweave.net/vAC3hA3Lxrhxt577iybPZ69gYKNuNvahQ-Cfp2WYXu4/prompt/prompt.ts:2010:34

    'prompts' is declared here.
        private prompts: PromptOptions<string, any, any>[],
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        at https://xqalpbanzpdlq4nxt35ywjwpm6xwayfdny3pnikd4cp2ozmyl3xa.arweave.net/vAC3hA3Lxrhxt577iybPZ69gYKNuNvahQ-Cfp2WYXu4/prompt/prompt.ts:2018:5

~ via ⬒ v15.12.0 via 🐍 v3.9.2 
➜ eggs --help
error: TS2729 [ERROR]: Property 'prompts' is used before its initialization.
  private names: string[] = this.prompts.map((prompt) => prompt.name);
                                 ~~~~~~~
    at https://xqalpbanzpdlq4nxt35ywjwpm6xwayfdny3pnikd4cp2ozmyl3xa.arweave.net/vAC3hA3Lxrhxt577iybPZ69gYKNuNvahQ-Cfp2WYXu4/prompt/prompt.ts:2010:34

    'prompts' is declared here.
        private prompts: PromptOptions<string, any, any>[],
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        at https://xqalpbanzpdlq4nxt35ywjwpm6xwayfdny3pnikd4cp2ozmyl3xa.arweave.net/vAC3hA3Lxrhxt577iybPZ69gYKNuNvahQ-Cfp2WYXu4/prompt/prompt.ts:2018:5

To Reproduce

  1. Install Deno 1.9
  2. Try to run eggs

Expected behavior

Work as usual.

Actual Behavior

It doesn't work, see error above.

Environment

  • Eggs version: 3.0.5
  • Deno version: 1.9.0
  • Operating system and version: Manjaro Linux x64

Additional context

Probably with the new minor Deno update it broke

An unexpected error occurred: "Something broke when publishing... "

πŸ› Bug Report

[CRIT] An unexpected error occurred: "Something broke when publishing... "

To Reproduce

  1. Use config from debug log

  2. Link you api key

deno run -A --unstable https://x.nest.land/[email protected]/eggs.ts link <api_key>
  1. Publish
deno run -A --unstable https://x.nest.land/[email protected]/eggs.ts publish

Expected behavior

Expected the package to publish

Actual Behavior

[CRIT] An unexpected error occurred: "Something broke when publishing... " "Error: Something broke when publishing... \n    at Command.publish [as fn] (publish.ts:365:11)\n    at async Command.execute (command.ts:796:9)\n    at async Command.parse (command.ts:731:14)\n    at async Command.parse (command.ts:688:14)\n    at async eggs.ts:74:23"

Environment

  • Eggs version: 0.3.0
  • Deno version: 1.4.6
  • Operating system and version: MacOS Catalina 10.15.7

Additional context

Arguments:
  publish

Deno version:
  deno: 1.4.6
  v8: 8.7.220.3
  typescript: 4.0.3

Eggs version:
  0.3.0

Platform:
  x86_64-apple-darwin

2020-10-25T09:53:20.988Z [DEBUG]    Raw config: {
  name: "Oak Middleware JWT",
  entry: "./mod.ts",
  description: "Oak middleware for JWT validation using djwt",
  homepage: "https://github.com/halvardssm/oak-middleware-jwt",
  version: "1.0.0",
  files: [ "./mod.ts", "./deps.ts", "./src/**/*", "./README.md", "./LICENSE" ],
  checkFormat: false,
  checkTests: false,
  checkInstallation: false,
  check: true
}
2020-10-25T09:53:20.990Z [DEBUG]    Ignore: undefined
2020-10-25T09:53:21.002Z [DEBUG]    Matched files: [
  {
    fullPath: "/oak-middleware-jwt/mod.ts",
    path: "/mod.ts",
    lstat: {
      isFile: true,
      isDirectory: false,
      isSymlink: false,
      size: 40,
      mtime: 2020-06-02T09:30:10.671Z,
      atime: 2020-06-02T09:30:11.009Z,
      birthtime: 2020-05-25T18:26:58.027Z,
      dev: 16777223,
      ino: 86321710,
      mode: 33188,
      nlink: 1,
      uid: 501,
      gid: 20,
      rdev: 0,
      blksize: 4096,
      blocks: 8
    }
  },
  {
    fullPath: "/oak-middleware-jwt/mod.ts",
    path: "/mod.ts",
    lstat: {
      isFile: true,
      isDirectory: false,
      isSymlink: false,
      size: 40,
      mtime: 2020-06-02T09:30:10.671Z,
      atime: 2020-06-02T09:30:11.009Z,
      birthtime: 2020-05-25T18:26:58.027Z,
      dev: 16777223,
      ino: 86321710,
      mode: 33188,
      nlink: 1,
      uid: 501,
      gid: 20,
      rdev: 0,
      blksize: 4096,
      blocks: 8
    }
  },
  {
    fullPath: "/oak-middleware-jwt/deps.ts",
    path: "/deps.ts",
    lstat: {
      isFile: true,
      isDirectory: false,
      isSymlink: false,
      size: 560,
      mtime: 2020-10-25T09:45:53.352Z,
      atime: 2020-10-25T09:45:53.427Z,
      birthtime: 2020-08-30T17:45:20.483Z,
      dev: 16777223,
      ino: 109401815,
      mode: 33188,
      nlink: 1,
      uid: 501,
      gid: 20,
      rdev: 0,
      blksize: 4096,
      blocks: 8
    }
  },
  {
    fullPath: "/oak-middleware-jwt/src/jwtMiddleware.ts",
    path: "/src/jwtMiddleware.ts",
    lstat: {
      isFile: true,
      isDirectory: false,
      isSymlink: false,
      size: 3855,
      mtime: 2020-10-25T09:08:47.354Z,
      atime: 2020-10-25T09:09:13.010Z,
      birthtime: 2020-08-30T17:45:20.484Z,
      dev: 16777223,
      ino: 109401816,
      mode: 33188,
      nlink: 1,
      uid: 501,
      gid: 20,
      rdev: 0,
      blksize: 4096,
      blocks: 8
    }
  },
  {
    fullPath: "/oak-middleware-jwt/README.md",
    path: "/README.md",
    lstat: {
      isFile: true,
      isDirectory: false,
      isSymlink: false,
      size: 3581,
      mtime: 2020-10-25T09:36:40.299Z,
      atime: 2020-10-25T09:36:41.803Z,
      birthtime: 2020-08-30T17:45:20.483Z,
      dev: 16777223,
      ino: 109401814,
      mode: 33188,
      nlink: 1,
      uid: 501,
      gid: 20,
      rdev: 0,
      blksize: 4096,
      blocks: 8
    }
  },
  {
    fullPath: "/oak-middleware-jwt/LICENSE",
    path: "/LICENSE",
    lstat: {
      isFile: true,
      isDirectory: false,
      isSymlink: false,
      size: 1077,
      mtime: 2020-05-25T09:39:54.562Z,
      atime: 2020-05-25T13:40:41.231Z,
      birthtime: 2020-05-25T09:39:54.561Z,
      dev: 16777223,
      ino: 86240260,
      mode: 33188,
      nlink: 1,
      uid: 501,
      gid: 20,
      rdev: 0,
      blksize: 4096,
      blocks: 8
    }
  }
]
2020-10-25T09:53:21.004Z [DEBUG]    Config: {
  name: "Oak Middleware JWT",
  entry: "/mod.ts",
  description: "Oak middleware for JWT validation using djwt",
  homepage: "https://github.com/halvardssm/oak-middleware-jwt",
  version: "1.0.0",
  files: [ "./mod.ts", "./deps.ts", "./src/**/*", "./README.md", "./LICENSE" ],
  checkFormat: false,
  checkTests: false,
  checkInstallation: false,
  check: true,
  ignore: [],
  unlisted: false
}
2020-10-25T09:53:21.905Z [INFO]     The resulting module is: 
        - name: "Oak Middleware JWT",
        - version: "1.0.0",
        - description: "Oak middleware for JWT validation using djwt",
        - repository: "https://github.com/halvardssm/oak-middleware-jwt",
        - unlisted: false,
        - stable: false,
        - upload: true,
        - latest: true,
        - entry: "/mod.ts"
2020-10-25T09:53:21.905Z [INFO]     Files to publish:
        - /mod.ts  (0.00004MB)
        - /mod.ts  (0.00004MB)
        - /deps.ts  (0.00056MB)
        - /src/jwtMiddleware.ts  (0.003855MB)
        - /README.md  (0.003581MB)
        - /LICENSE  (0.001077MB)
2020-10-25T09:53:24.573Z [CRITICAL] An unexpected error occurred: "Something broke when publishing... " "Error: Something broke when publishing... \n    at Command.publish [as fn] (publish.ts:365:11)\n    at async Command.execute (command.ts:796:9)\n    at async Command.parse (command.ts:731:14)\n    at async Command.parse (command.ts:688:14)\n    at async eggs.ts:74:23"

eggs init supercharged

Would it be a good idea to enhance the eggs init feature in a way that it adds all .ts files + README + LICENSE + "repository" (git remote -v ...) as default content to egg.json?

Background 1:
In order to automate the process of creating PRs on each deno module which is not yet published on nest.land this would be helpful

Background 2:
In order to simplify people's lives who use "eggs init" "manually" this would imo also be helpful

Getting "[ERR] No /mod.ts found in config. An entry file is required." when the entry file is not mod.ts.

Describe the bug

In eggs version 0.2.2, whatever I set the entry property to in the egg.json (or egg.yaml) file, I get the following error when running eggs publish:
[ERR] No /mod.ts found in config. An entry file is required.
This happens whether there is an entry property; whether the the entry file mentioned exists; whether there is a ./, / or nothing preceding the file name; whether the file extention is .js or .ts and whether the entry file is set to mod.ts or something else (actually I only get this problem when the entry file isn't mod.ts).

All the other properties seem to be working fine (I only get errors about not having a name, description or version if they aren't included in egg.json) but for some reason it never seems to pick up on the entry property.

To Reproduce

I am using Windows 10, Deno 1.4.1, Eggs 0.2.2. It seems to be happening with any eggs project.

version 0.3.10 not installable

πŸ› Bug Report

Running

deno install -Afq --unstable -n eggs https://x.nest.land/[email protected]/eggs.ts

throws this error:

error: Emitted code for "https://x.nest.land/[email protected]/eggs.ts" not found.

To Reproduce

  1. Run this:
deno install -Afq --unstable -n eggs https://x.nest.land/[email protected]/eggs.ts

Expected behavior

It should install the latest version.

Actual Behavior

It doesn't install the latest version, but instead throws an error.

Environment

  • Eggs version: 0.3.9
  • Deno version: 1.16.1
  • Operating system and version: macOS Montery beta 12.1 (21C5039b)

Additional context

Running

eggs upgrade

throws with this:

[CRIT] An unexpected error occurred: "Failed to upgrade to the latest CLI version!"
[INFO] Debug file created. (/Users/nnmrts/eggs-debug.log)
[INFO] If you think this is a bug, please open a bug report at https://github.com/nestdotland/eggs/issues/new/choose with the information provided in /Users/nnmrts/eggs-debug.log
[INFO] Visit https://docs.nest.land/eggs/ for documentation about this command.

This is the content of eggs-debug.log:

Arguments:
  upgrade

Deno version:
  deno: 1.16.1
  v8: 9.7.106.2
  typescript: 4.4.2

Eggs version:
  0.3.9

Platform:
  x86_64-apple-darwin

2021-11-26T01:25:21.345Z [DEBUG]    stdout:  ""
2021-11-26T01:25:21.347Z [DEBUG]    stderr:  '\x1b[0m\x1b[1m\x1b[31merror\x1b[0m: Emitted code for "https://x.nest.land/[email protected]/eggs.ts" not found.\n'
2021-11-26T01:25:21.353Z [CRITICAL] An unexpected error occurred: "Failed to upgrade to the latest CLI version!" "Error: Failed to upgrade to the latest CLI version!
    at Command.upgrade [as fn] (https://jzyko3slwfqdzjdsou33pfterimczldnatkgr5gbecmatum3y3yq.arweave.net/TnCnbkuxYDykcnU3t5ZkihgsrG0E1Gj0wSCYCdGbxvE/src/commands/upgrade.ts:44:11)
    at async Command.execute (https://jwhfb66f7jdbrh5zp6sooj57qz2ur7p3n4uipb3cs5s2tdpndy6q.arweave.net/TY5Q-8X6RhifuX-k5ye_hnVI_ftvKIeHYpdlqY3tHj0/command/command.ts:993:7)
    at async Command.parse (https://jwhfb66f7jdbrh5zp6sooj57qz2ur7p3n4uipb3cs5s2tdpndy6q.arweave.net/TY5Q-8X6RhifuX-k5ye_hnVI_ftvKIeHYpdlqY3tHj0/command/command.ts:914:16)
    at async https://jzyko3slwfqdzjdsou33pfterimczldnatkgr5gbecmatum3y3yq.arweave.net/TnCnbkuxYDykcnU3t5ZkihgsrG0E1Gj0wSCYCdGbxvE/eggs.ts:74:23"

Error install in Deno 1.14

eggs the great tool. but i'm try to install deno install -Af --unstable https://x.nest.land/[email protected]/eggs.ts and getting error :

error: TS2801 [ERROR]: This condition will always return true since this 'Promise<Deno.PermissionStatus>' is always defined.
  if (Deno.permissions.query({ name: "env" })) {
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    at https://deno.land/x/[email protected]/is_interactive.ts:2:7

TS2773 [ERROR]:     Did you forget to use 'await'?
      if (Deno.permissions.query({ name: "env" })) {
          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        at https://deno.land/x/[email protected]/is_interactive.ts:2:7

Deno: 1.14
eggs: 0.3.8

Thanks...

All eggs commands don't work in Deno 1.4

Describe the bug
Whenever I run a command such as eggs publish, eggs init or eggs -V nothing happens.
Previously (just after updating Deno to 1.4.0), I got the following error messages:

error: TS1205 [ERROR]: Re-exporting a type when the '--isolatedModules' flag is provided requires using 'export type'.
export { LogLevels, LevelName } from "./levels.ts";
                    ~~~~~~~~~
    at https://iigk45i7o35wcqut6db5ji5nuwoj2nhlbqvk2jqrlhewcix6b7ja.arweave.net/QgyudR92-2FCk_DD1KOtpZydNOsMKq0mEVnJYSL-D9I/log/mod.ts:13:21

TS1371 [ERROR]: This import is never used as a value and must use 'import type' because the 'importsNotUsedAsValues' is set to 'error'.
import { LanguageSpecific } from 'https://deno.land/x/case/types.ts';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    at https://owhnahgrxgphnvioxm36tgjvmmia36lerfcwf2tj5pafdlfbe2na.arweave.net/dY7QHNG5nnbVDrs36Zk1YxAN-WSJRWLqaevAUayhJpo/packages/x/lowerCase.ts:5:1

TS1371 [ERROR]: This import is never used as a value and must use 'import type' because the 'importsNotUsedAsValues' is set to 'error'.
import { LanguageSpecific } from 'https://deno.land/x/case/types.ts';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    at https://owhnahgrxgphnvioxm36tgjvmmia36lerfcwf2tj5pafdlfbe2na.arweave.net/dY7QHNG5nnbVDrs36Zk1YxAN-WSJRWLqaevAUayhJpo/packages/x/upperCase.ts:1:1

TS1371 [ERROR]: This import is never used as a value and must use 'import type' because the 'importsNotUsedAsValues' is set to 'error'.
import { IFlagArgument, IFlagOptions, ITypeHandler } from '../types.ts';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    at https://owhnahgrxgphnvioxm36tgjvmmia36lerfcwf2tj5pafdlfbe2na.arweave.net/dY7QHNG5nnbVDrs36Zk1YxAN-WSJRWLqaevAUayhJpo/packages/flags/lib/types/boolean.ts:1:1

TS1371 [ERROR]: This import is never used as a value and must use 'import type' because the 'importsNotUsedAsValues' is set to 'error'.
import { IFlagArgument, IFlagOptions, ITypeHandler } from '../types.ts';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    at https://owhnahgrxgphnvioxm36tgjvmmia36lerfcwf2tj5pafdlfbe2na.arweave.net/dY7QHNG5nnbVDrs36Zk1YxAN-WSJRWLqaevAUayhJpo/packages/flags/lib/types/number.ts:1:1       

TS1371 [ERROR]: This import is never used as a value and must use 'import type' because the 'importsNotUsedAsValues' is set to 'error'.
import { IFlagArgument, IFlagOptions, ITypeHandler } from '../types.ts';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    at https://owhnahgrxgphnvioxm36tgjvmmia36lerfcwf2tj5pafdlfbe2na.arweave.net/dY7QHNG5nnbVDrs36Zk1YxAN-WSJRWLqaevAUayhJpo/packages/flags/lib/types/string.ts:1:1       

TS1371 [ERROR]: This import is never used as a value and must use 'import type' because the 'importsNotUsedAsValues' is set to 'error'.
import { IFlagArgument, IFlagOptions, IFlags, IFlagValue } from './types.ts';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    at https://owhnahgrxgphnvioxm36tgjvmmia36lerfcwf2tj5pafdlfbe2na.arweave.net/dY7QHNG5nnbVDrs36Zk1YxAN-WSJRWLqaevAUayhJpo/packages/flags/lib/validate-flags.ts:4:1     

TS1371 [ERROR]: This import is never used as a value and must use 'import type' because the 'importsNotUsedAsValues' is set to 'error'.
import { IFlagArgument, IFlagOptions } from '../../flags/lib/types.ts';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    at https://owhnahgrxgphnvioxm36tgjvmmia36lerfcwf2tj5pafdlfbe2na.arweave.net/dY7QHNG5nnbVDrs36Zk1YxAN-WSJRWLqaevAUayhJpo/packages/command/types/boolean.ts:1:1        

TS1371 [ERROR]: This import is never used as a value and must use 'import type' because the 'importsNotUsedAsValues' is set to 'error'.
import { IFlagArgument, IFlagOptions } from '../../flags/lib/types.ts';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    at https://owhnahgrxgphnvioxm36tgjvmmia36lerfcwf2tj5pafdlfbe2na.arweave.net/dY7QHNG5nnbVDrs36Zk1YxAN-WSJRWLqaevAUayhJpo/packages/command/types/number.ts:1:1

TS1371 [ERROR]: This import is never used as a value and must use 'import type' because the 'importsNotUsedAsValues' is set to 'error'.
import { IFlagArgument, IFlagOptions } from '../../flags/lib/types.ts';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    at https://owhnahgrxgphnvioxm36tgjvmmia36lerfcwf2tj5pafdlfbe2na.arweave.net/dY7QHNG5nnbVDrs36Zk1YxAN-WSJRWLqaevAUayhJpo/packages/command/types/string.ts:1:1

TS1371 [ERROR]: This import is never used as a value and must use 'import type' because the 'importsNotUsedAsValues' is set to 'error'.
import { IArgumentDetails } from './types.ts';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    at https://owhnahgrxgphnvioxm36tgjvmmia36lerfcwf2tj5pafdlfbe2na.arweave.net/dY7QHNG5nnbVDrs36Zk1YxAN-WSJRWLqaevAUayhJpo/packages/command/lib/arguments-parser.ts:3:1 

TS1371 [ERROR]: This import is never used as a value and must use 'import type' because the 'importsNotUsedAsValues' is set to 'error'.
import { ICell } from './cell.ts';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    at https://owhnahgrxgphnvioxm36tgjvmmia36lerfcwf2tj5pafdlfbe2na.arweave.net/dY7QHNG5nnbVDrs36Zk1YxAN-WSJRWLqaevAUayhJpo/packages/table/lib/row.ts:1:1

TS1371 [ERROR]: This import is never used as a value and must use 'import type' because the 'importsNotUsedAsValues' is set to 'error'.
import { IFlagOptions } from '../../flags/lib/types.ts';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    at https://owhnahgrxgphnvioxm36tgjvmmia36lerfcwf2tj5pafdlfbe2na.arweave.net/dY7QHNG5nnbVDrs36Zk1YxAN-WSJRWLqaevAUayhJpo/packages/command/lib/help-generator.ts:2:1   

TS1371 [ERROR]: This import is never used as a value and must use 'import type' because the 'importsNotUsedAsValues' is set to 'error'.
import { Command } from './command.ts';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    at https://owhnahgrxgphnvioxm36tgjvmmia36lerfcwf2tj5pafdlfbe2na.arweave.net/dY7QHNG5nnbVDrs36Zk1YxAN-WSJRWLqaevAUayhJpo/packages/command/lib/help-generator.ts:6:1   

TS1371 [ERROR]: This import is never used as a value and must use 'import type' because the 'importsNotUsedAsValues' is set to 'error'.
import { IEnvVariable, IExample, IOption } from './types.ts';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    at https://owhnahgrxgphnvioxm36tgjvmmia36lerfcwf2tj5pafdlfbe2na.arweave.net/dY7QHNG5nnbVDrs36Zk1YxAN-WSJRWLqaevAUayhJpo/packages/command/lib/help-generator.ts:7:1   

TS1371 [ERROR]: This import is never used as a value and must use 'import type' because the 'importsNotUsedAsValues' is set to 'error'.
import { IFlagArgument, IFlagOptions, IFlagsResult, IFlagValue, IFlagValueHandler, IFlagValueType, ITypeHandler } from '../../flags/lib/types.ts';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    at https://owhnahgrxgphnvioxm36tgjvmmia36lerfcwf2tj5pafdlfbe2na.arweave.net/dY7QHNG5nnbVDrs36Zk1YxAN-WSJRWLqaevAUayhJpo/packages/command/lib/command.ts:5:1

TS1371 [ERROR]: This import is never used as a value and must use 'import type' because the 'importsNotUsedAsValues' is set to 'error'.
    at https://owhnahgrxgphnvioxm36tgjvmmia36lerfcwf2tj5pafdlfbe2na.arweave.net/dY7QHNG5nnbVDrs36Zk1YxAN-WSJRWLqaevAUayhJpo/packages/command/lib/command.ts:14:1

TS1371 [ERROR]: This import is never used as a value and must use 'import type' because the 'importsNotUsedAsValues' is set to 'error'.
import { IFlagArgument, IFlagOptions } from '../../flags/lib/types.ts';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    at https://owhnahgrxgphnvioxm36tgjvmmia36lerfcwf2tj5pafdlfbe2na.arweave.net/dY7QHNG5nnbVDrs36Zk1YxAN-WSJRWLqaevAUayhJpo/packages/command/types/type.ts:1:1

TS1371 [ERROR]: This import is never used as a value and must use 'import type' because the 'importsNotUsedAsValues' is set to 'error'.
import { Command } from '../lib/command.ts';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    at https://owhnahgrxgphnvioxm36tgjvmmia36lerfcwf2tj5pafdlfbe2na.arweave.net/dY7QHNG5nnbVDrs36Zk1YxAN-WSJRWLqaevAUayhJpo/packages/command/types/type.ts:2:1

TS1371 [ERROR]: This import is never used as a value and must use 'import type' because the 'importsNotUsedAsValues' is set to 'error'.
import { IFlagArgument, IFlagOptions, ITypeHandler } from '../../flags/lib/types.ts';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    at https://owhnahgrxgphnvioxm36tgjvmmia36lerfcwf2tj5pafdlfbe2na.arweave.net/dY7QHNG5nnbVDrs36Zk1YxAN-WSJRWLqaevAUayhJpo/packages/command/lib/types.ts:1:1

TS1371 [ERROR]: This import is never used as a value and must use 'import type' because the 'importsNotUsedAsValues' is set to 'error'.
import { Type } from '../types/type.ts';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    at https://owhnahgrxgphnvioxm36tgjvmmia36lerfcwf2tj5pafdlfbe2na.arweave.net/dY7QHNG5nnbVDrs36Zk1YxAN-WSJRWLqaevAUayhJpo/packages/command/lib/types.ts:2:1

TS1371 [ERROR]: This import is never used as a value and must use 'import type' because the 'importsNotUsedAsValues' is set to 'error'.
import { Command } from './command.ts';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    at https://owhnahgrxgphnvioxm36tgjvmmia36lerfcwf2tj5pafdlfbe2na.arweave.net/dY7QHNG5nnbVDrs36Zk1YxAN-WSJRWLqaevAUayhJpo/packages/command/lib/types.ts:3:1

TS1371 [ERROR]: This import is never used as a value and must use 'import type' because the 'importsNotUsedAsValues' is set to 'error'.
import { IFlags } from '../../../flags/lib/types.ts';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    at https://owhnahgrxgphnvioxm36tgjvmmia36lerfcwf2tj5pafdlfbe2na.arweave.net/dY7QHNG5nnbVDrs36Zk1YxAN-WSJRWLqaevAUayhJpo/packages/command/commands/completions/complete.ts:2:1

TS1371 [ERROR]: This import is never used as a value and must use 'import type' because the 'importsNotUsedAsValues' is set to 'error'.
import { ICompleteSettings } from '../../lib/types.ts';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    at https://owhnahgrxgphnvioxm36tgjvmmia36lerfcwf2tj5pafdlfbe2na.arweave.net/dY7QHNG5nnbVDrs36Zk1YxAN-WSJRWLqaevAUayhJpo/packages/command/commands/completions/complete.ts:4:1

TS1371 [ERROR]: This import is never used as a value and must use 'import type' because the 'importsNotUsedAsValues' is set to 'error'.
import { Command } from './command.ts';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    at https://owhnahgrxgphnvioxm36tgjvmmia36lerfcwf2tj5pafdlfbe2na.arweave.net/dY7QHNG5nnbVDrs36Zk1YxAN-WSJRWLqaevAUayhJpo/packages/command/lib/zsh-completions-generator.ts:2:1

TS1371 [ERROR]: This import is never used as a value and must use 'import type' because the 'importsNotUsedAsValues' is set to 'error'.
import { IArgumentDetails, IOption } from './types.ts';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    at https://owhnahgrxgphnvioxm36tgjvmmia36lerfcwf2tj5pafdlfbe2na.arweave.net/dY7QHNG5nnbVDrs36Zk1YxAN-WSJRWLqaevAUayhJpo/packages/command/lib/zsh-completions-generator.ts:3:1

TS1371 [ERROR]: This import is never used as a value and must use 'import type' because the 'importsNotUsedAsValues' is set to 'error'.
import { Command } from '../lib/command.ts';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    at https://owhnahgrxgphnvioxm36tgjvmmia36lerfcwf2tj5pafdlfbe2na.arweave.net/dY7QHNG5nnbVDrs36Zk1YxAN-WSJRWLqaevAUayhJpo/packages/command/types/command.ts:1:1        

TS1371 [ERROR]: This import is never used as a value and must use 'import type' because the 'importsNotUsedAsValues' is set to 'error'.
import { IFlags } from '../../flags/lib/types.ts';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    at https://owhnahgrxgphnvioxm36tgjvmmia36lerfcwf2tj5pafdlfbe2na.arweave.net/dY7QHNG5nnbVDrs36Zk1YxAN-WSJRWLqaevAUayhJpo/packages/command/commands/help.ts:1:1        

TS1371 [ERROR]: This import is never used as a value and must use 'import type' because the 'importsNotUsedAsValues' is set to 'error'.
import { Command } from '../lib/command.ts';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    at https://owhnahgrxgphnvioxm36tgjvmmia36lerfcwf2tj5pafdlfbe2na.arweave.net/dY7QHNG5nnbVDrs36Zk1YxAN-WSJRWLqaevAUayhJpo/packages/command/types/action-list.ts:1:1    

TS1371 [ERROR]: This import is never used as a value and must use 'import type' because the 'importsNotUsedAsValues' is set to 'error'.
import { Command } from '../lib/command.ts';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    at https://owhnahgrxgphnvioxm36tgjvmmia36lerfcwf2tj5pafdlfbe2na.arweave.net/dY7QHNG5nnbVDrs36Zk1YxAN-WSJRWLqaevAUayhJpo/packages/command/types/child-command.ts:1:1  

TS1371 [ERROR]: This import is never used as a value and must use 'import type' because the 'importsNotUsedAsValues' is set to 'error'.
import { KeyEvent } from '../../keycode/lib/key-event.ts';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    at https://owhnahgrxgphnvioxm36tgjvmmia36lerfcwf2tj5pafdlfbe2na.arweave.net/dY7QHNG5nnbVDrs36Zk1YxAN-WSJRWLqaevAUayhJpo/packages/prompt/lib/generic-prompt.ts:4:1    

TS1371 [ERROR]: This import is never used as a value and must use 'import type' because the 'importsNotUsedAsValues' is set to 'error'.
import { KeyEvent } from '../../keycode/lib/key-event.ts';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    at https://owhnahgrxgphnvioxm36tgjvmmia36lerfcwf2tj5pafdlfbe2na.arweave.net/dY7QHNG5nnbVDrs36Zk1YxAN-WSJRWLqaevAUayhJpo/packages/prompt/lib/generic-input.ts:3:1     

TS1371 [ERROR]: This import is never used as a value and must use 'import type' because the 'importsNotUsedAsValues' is set to 'error'.
import { KeyEvent } from '../../keycode/mod.ts';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    at https://owhnahgrxgphnvioxm36tgjvmmia36lerfcwf2tj5pafdlfbe2na.arweave.net/dY7QHNG5nnbVDrs36Zk1YxAN-WSJRWLqaevAUayhJpo/packages/prompt/prompts/checkbox.ts:2:1      

TS1371 [ERROR]: This import is never used as a value and must use 'import type' because the 'importsNotUsedAsValues' is set to 'error'.
import { KeyEvent } from '../../keycode/lib/key-event.ts';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    at https://owhnahgrxgphnvioxm36tgjvmmia36lerfcwf2tj5pafdlfbe2na.arweave.net/dY7QHNG5nnbVDrs36Zk1YxAN-WSJRWLqaevAUayhJpo/packages/prompt/prompts/number.ts:2:1        

TS1371 [ERROR]: This import is never used as a value and must use 'import type' because the 'importsNotUsedAsValues' is set to 'error'.
import { KeyEvent } from '../../keycode/lib/key-event.ts';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    at https://owhnahgrxgphnvioxm36tgjvmmia36lerfcwf2tj5pafdlfbe2na.arweave.net/dY7QHNG5nnbVDrs36Zk1YxAN-WSJRWLqaevAUayhJpo/packages/prompt/prompts/select.ts:2:1        

TS1371 [ERROR]: This import is never used as a value and must use 'import type' because the 'importsNotUsedAsValues' is set to 'error'.
import { KeyEvent } from '../../keycode/lib/key-event.ts';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    at https://owhnahgrxgphnvioxm36tgjvmmia36lerfcwf2tj5pafdlfbe2na.arweave.net/dY7QHNG5nnbVDrs36Zk1YxAN-WSJRWLqaevAUayhJpo/packages/prompt/prompts/toggle.ts:2:1        

TS1205 [ERROR]: Re-exporting a type when the '--isolatedModules' flag is provided requires using 'export type'.
  LevelName,
  ~~~~~~~~~
    at https://nulzkufawsbf6nxyk7vfekrhs43qldcnbc64rdo7nq2ojnl74rza.arweave.net/bReVUKC0gl82-FfqUionlzcFjE0IvciN32w05LV_5HI/deps.ts:25:3

TS1205 [ERROR]: Re-exporting a type when the '--isolatedModules' flag is provided requires using 'export type'.
  IFlagArgument,
  ~~~~~~~~~~~~~
    at https://nulzkufawsbf6nxyk7vfekrhs43qldcnbc64rdo7nq2ojnl74rza.arweave.net/bReVUKC0gl82-FfqUionlzcFjE0IvciN32w05LV_5HI/deps.ts:68:3

TS1205 [ERROR]: Re-exporting a type when the '--isolatedModules' flag is provided requires using 'export type'.
  IFlagOptions,
  ~~~~~~~~~~~~
    at https://nulzkufawsbf6nxyk7vfekrhs43qldcnbc64rdo7nq2ojnl74rza.arweave.net/bReVUKC0gl82-FfqUionlzcFjE0IvciN32w05LV_5HI/deps.ts:69:3

TS1205 [ERROR]: Re-exporting a type when the '--isolatedModules' flag is provided requires using 'export type'.
  GlobalModuleConfig,
  ~~~~~~~~~~~~~~~~~~
    at https://nulzkufawsbf6nxyk7vfekrhs43qldcnbc64rdo7nq2ojnl74rza.arweave.net/bReVUKC0gl82-FfqUionlzcFjE0IvciN32w05LV_5HI/deps.ts:82:3

TS1371 [ERROR]: This import is never used as a value and must use 'import type' because the 'importsNotUsedAsValues' is set to 'error'.
import { DefaultOptions } from "../commands.ts";
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    at https://nulzkufawsbf6nxyk7vfekrhs43qldcnbc64rdo7nq2ojnl74rza.arweave.net/bReVUKC0gl82-FfqUionlzcFjE0IvciN32w05LV_5HI/src/commands/link.ts:2:1

TS1371 [ERROR]: This import is never used as a value and must use 'import type' because the 'importsNotUsedAsValues' is set to 'error'.
import { DefaultOptions } from "../commands.ts";
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    at https://nulzkufawsbf6nxyk7vfekrhs43qldcnbc64rdo7nq2ojnl74rza.arweave.net/bReVUKC0gl82-FfqUionlzcFjE0IvciN32w05LV_5HI/src/commands/init.ts:18:1

TS1371 [ERROR]: This import is never used as a value and must use 'import type' because the 'importsNotUsedAsValues' is set to 'error'.
import { DefaultOptions } from "../commands.ts";
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    at https://nulzkufawsbf6nxyk7vfekrhs43qldcnbc64rdo7nq2ojnl74rza.arweave.net/bReVUKC0gl82-FfqUionlzcFjE0IvciN32w05LV_5HI/src/commands/publish.ts:17:1

import { Ignore } from "../context/ignore.ts";
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    at https://nulzkufawsbf6nxyk7vfekrhs43qldcnbc64rdo7nq2ojnl74rza.arweave.net/bReVUKC0gl82-FfqUionlzcFjE0IvciN32w05LV_5HI/src/commands/publish.ts:24:1

TS1371 [ERROR]: This import is never used as a value and must use 'import type' because the 'importsNotUsedAsValues' is set to 'error'.
import { DefaultOptions } from "../commands.ts";
    at https://nulzkufawsbf6nxyk7vfekrhs43qldcnbc64rdo7nq2ojnl74rza.arweave.net/bReVUKC0gl82-FfqUionlzcFjE0IvciN32w05LV_5HI/src/commands/update.ts:14:1

TS1371 [ERROR]: This import is never used as a value and must use 'import type' because the 'importsNotUsedAsValues' is set to 'error'.
import { DefaultOptions } from "../commands.ts";
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    at https://nulzkufawsbf6nxyk7vfekrhs43qldcnbc64rdo7nq2ojnl74rza.arweave.net/bReVUKC0gl82-FfqUionlzcFjE0IvciN32w05LV_5HI/src/commands/install.ts:15:1

TS1371 [ERROR]: This import is never used as a value and must use 'import type' because the 'importsNotUsedAsValues' is set to 'error'.
import { DefaultOptions } from "../commands.ts";
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

TS1371 [ERROR]: This import is never used as a value and must use 'import type' because the 'importsNotUsedAsValues' is set to 'error'.
import { DefaultOptions } from "./src/commands.ts";
    at https://nulzkufawsbf6nxyk7vfekrhs43qldcnbc64rdo7nq2ojnl74rza.arweave.net/bReVUKC0gl82-FfqUionlzcFjE0IvciN32w05LV_5HI/mod.ts:2:1

Found 48 errors.

I then tried to upgrade with eggs upgrade to see if there was a fix but eggs upgrade produced the same errors. I then installed the latest version (which was actually the same version I was on previously) with deno install -A -f --unstable -n eggs https://x.nest.land/[email protected]/mod.ts and Deno said that it had "βœ… Successfully installed eggs". However, now I wouldn't get anything when I ran an eggs command (not even an error message). The commands run but do nothing.

To Reproduce

I think that this is a problem with Deno 1.4, although I can't be sure as I am having trouble downgrading version.

Expected behavior

The commands should run without errors and output logs of what is happening to the console.

Desktop:

  • OS: Windows 10
  • nest.land Version: 0.2.1

publish() api is ignoring config options

πŸ› Bug Report

When using the publish api, config properties unstable and unlisted are ignored compared to using the cli. Probably others are too.

In this example unstable and unlisted are both set to false but the summary before publish shows that those are ignored and stable is set to true and unlisted to false

I think this is quite dangerous in some way :)

To Reproduce

import { publish } from 'https://x.nest.land/[email protected]/src/commands/publish.ts';
const moduleName = 'xyz'
await publish({
  check: true,
  checkFormat: 'vr fmt',
  checkTests: 'vr test',
  description: 'xxx',
  dryRun: true,
  yes: false,
  files: [
    'core/**/*.ts'
  ],
  ignore: [
    '.git',
    '*.test.ts',
    '*_test.ts',
  ],
  version: '1.0.0',
  releaseType: 'patch',
  debug: true,
  outputLog: true,
  entry: './mod.ts',
  unlisted: true,
  unstable: true,
}, moduleName)

Expected behavior

[INFO] The resulting module is: 
...
        - description: "XXX",
        - repository: "",
        - unlisted: true,
        - stable: false,
...

Actual Behavior

[INFO] The resulting module is: 
...
        - description: "XXX",
        - repository: "",
        - unlisted: false,
        - stable: true,
...

Environment

  • Eggs version: 0.3.9
  • Deno version: 1.15.3
  • Operating system and version: Linux next 5.14.10-1-MANJARO #1 SMP PREEMPT Thu Oct 7 06:43:34 UTC 2021 x86_64 GNU/Linux

Additional context

None

[Question] `eggs update -g` flag missing

The -g flag that was used to update global installations seems to be gone. Could you clarify why that happened?

Also, the feature is still documented in README and hatcher still hints at doing eggs update -g when there is a new version available.

Draft eggs cli v-00, contextual awareness

eggs cli v-00, contextual awareness

adapted from qu4k/drafts

abstract

remove the need of a configuration file for nest.land modules, gathering much
of the information from the module directory itself.

current implementation

as it stands the basic - but complete - implementation of a nest.land eggs.json
file is:

{
    "name": "module-name",
    "description": "Your brief module description",
    "version": "0.0.1",
    "entry": "./src/main.ts",
    "stable": true,
    "unlisted": false,
    "fmt": true,
    "repository": "https://github.com/your_name/your_project",
    "files": [
        "./mod.ts",
        "./src/**/*",
        "./README.md"
    ]
}

information for all the fields can be retrieved from the documentation:
https://nest.land/docs#configuration

future implementation

the methods proposed are considered a direct substitute for the current
eggs.json file. this does not mean that eggs.json will be deprecated
though, since the user can always provide one. our focus should be ease
of use without the need of a file. if the user chooses to make use of
a file for fine control he is free to do so.

if no eggs.json is provided, the publish command will now consist of
a series of questions with default answers gathered from the methods
below. not all fields are required in every publish event.

... first of all

  • the CLI must be able to call the API and gather info about the module
    after the first publish.
  • "only first publish" indicates that this field is no longer needed after
    the first publish, but (with the exception of name) can be changed later with
    cli flag (eg. --override-description)
  • NVC stands for "no version control".

name

  • only first publish
  • suggestion can be retrieved from root directory name or README.md

description

  • only fist publish
  • suggestion can be retrieved from README.md subtitle / line after title

version

  • every publish
  • SVN: $ svn log <repo>/tags --limit 1
  • GIT: $ git describe
  • NVC: the CHANGELOG.md file or CLI input

this information can be also retrieved without using Deno.run() by simply
parsing version control files (eg .git/refs/tags/).
this information can be also retrieved in a CHANGELOG.md file.

stable

  • arbitrary
  • can be moved to cli input or as a --unstable flag.

fmt

  • arbitrary
  • can be moved to cli input or as a --fmt flag.
    (eg: would you like to run "deno fmt" before publishing?).

repository

  • only first publish
  • SVN: $ svn info
  • GIT: $ git remote -v
  • NVC: CLI input

files

files can be retrieved in an opt-out fashion. The CLI should be able to parse
a .ignore-type file, if provided, and exclude files/directories
from publishing:

  • SVN: $ svn proplist -v -R dir/
  • GIT: the .gitignore file
  • NVC: the .eggsignore file

.eggignore does not follow .gitignore pattern behavior

πŸ› Bug Report

The documentation on .eggignore claims that it follows the same rules as the .gitignore pattern format. However, I've found a few examples where this isn't true.

Assume this folder structure.

β”œβ”€β”€ .eggignore
β”œβ”€β”€ .gitignore
β”œβ”€β”€ bar
β”‚   └── foo
β”œβ”€β”€ baz
β”‚   └── foo
β”‚       └── bar
└── foo
    └── bar
# .gitignore
foo
# .eggignore
extends .gitignore

Apart from .gitignore and .eggignore, Git will ignore every file, including files named foo and files inside directories named foo. However, Eggs will only ignore bar/foo, i.e. files named foo but not files inside directories named foo.

# git status
Untracked files:
  (use "git add <file>..." to include in what will be committed)
        .eggignore
        .gitignore
# eggs publish
[INFO] Files to publish:
        - ./.eggignore  (0.000019MB)
        - ./.gitignore  (0.000004MB)
        - ./baz/foo/bar  (0MB)
        - ./foo/bar  (0MB)

We get the same behavior from both Git and Eggs, respectively, with this .gitignore.

# .gitignore
**/foo

However, with this .gitignore...

# .gitignore
foo/**

Git will only ignore foo/bar, and Eggs correctly follows this behavior.

# git status
Untracked files:
  (use "git add <file>..." to include in what will be committed)
        .eggignore
        .gitignore
        bar/
        baz/
# eggs publish
[INFO] Files to publish:
        - ./.eggignore  (0.000019MB)
        - ./.gitignore  (0.000007MB)
        - ./bar/foo  (0MB)
        - ./baz/foo/bar  (0MB)

Switching gears a bit, consider a folder structure like this.

β”œβ”€β”€ .eggignore
β”œβ”€β”€ .gitignore
β”œβ”€β”€ bar
β”‚   └── foo
└── foo

To have Git only ignore the file named foo in the top-level of our project, we would use a .gitignore like this.

# .gitignore
/foo

However, Eggs will not ignore it. To get Eggs to ignore the top-level foo file, we need a .gitignore like this.

# .gitignore
./foo

However, Git does not support dot-slash syntax to indicate project relative paths. To get this behavior to work in Git and Eggs, you need two paths.

# .gitignore
# Git:  top-level file
/foo
# Eggs: top-level file
./foo

Yet, this is still broken if the top-level foo is a directory.

β”œβ”€β”€ .eggignore
β”œβ”€β”€ .gitignore
β”œβ”€β”€ bar
β”‚   └── foo
└── foo
    └── bar

Using the .gitignore with both paths, Git will correctly ignore foo/bar, however Eggs will not since foo is a directory. To ignore top-level foo files and directories with both Git and Eggs, we need a .gitignore like this.

# .gitignore
# Git:  top-level file and directory
/foo
# Eggs: top-level file
./foo
# Eggs: top-level directory
./foo/**

To Reproduce

See Bug Report.

Expected behavior

.eggignore should follow the same behavior as .gitignore especially when using extends .gitignore.

Actual Behavior

See Bug Report.

Environment

  • Eggs version: 0.3.10
  • Deno version: 1.25.3
  • Operating system and version: Tested on both Windows 10 and Ubuntu 20.04

Additional context

Tests Still Run Even When `checkTest` is `false`

πŸ› Bug Report

When i set checkTest inside my egg.json file to false, then run eggs publish, the check still runs. Alternatively, having check to false still runs all checks

Reason why set this is because the tests work locally, but not with the check flag

To Reproduce

Use eggs v0.3.2 and set checkTest to false

Expected behavior

The check for testing should not have been ran

Actual Behavior

The check test was still being ran

Environment

  • Eggs version: 0.3.2
  • Deno version: 1.5.1
  • Operating system and version: MacOS v10.13.6 High Sierra

`eggs publish` Fails with Deno v1.6.0

πŸ› Bug Report

When running eggs publish on deno v1.6.0, `eggs publish fails with the following error:

image

To Reproduce

The steps taken. are here:

runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
      with:
        fetch-depth: 2
        repository: drashland/${{ github.event.client_payload.repo }}
    - uses: denolib/setup-deno@master
    - run: |
        deno install -A -f --unstable -n eggs https://x.nest.land/[email protected]/eggs.ts
        export PATH="/home/runner/.deno/bin:$PATH"
        eggs link ${{ secrets.CI_NESTLAND_API_KEY }}
        eggs publish --no-check-tests --yes

Expected behavior

I understand eggs hasn't been updated, so it's not like i'm expecting this to just work. This issue is more to bring it to your attention. On deno v1.6.0 (eggs v0.3.3?), publishing should work

Actual Behavior

Publishing failed due to a compiling error

Environment

  • Eggs version: 0.3.2
  • Deno version: v1.6.0
  • Operating system and version: ubuntu-latest

CLI ignoring DENO_DIR environment variable

πŸ› Bug Report

When using the eggs cli, it tends to ignore the DENO_DIR variable occasionally, such as put "hatcher" files in $HOME/.deno while as DENO_DIR is being set to $HOME/.local/deno

To Reproduce

  1. Set the DENO_DIR environment variable in your .zshrc or equivalent file
  2. Install eggs normally through the command seen in the documentation
  3. You'll notice that eggs was installed to $HOME/.deno and not where the variable is set

Expected behavior

It should be follow the DENO_DIR variable for installation and other operations

Actual Behavior

It installs into $HOME/.deno despite the variable being set

screenshot

Environment

  • Eggs version: 0.3.5
  • Deno version: 1.7.5 (release, x86_64-unknown-linux-gnu)
  • Operating system and version: Arch Linux on WSL (4.19.128-microsoft-standard)

publish with --bump arg does not seem to work properly

Logs

Arguments:
  publish,--bump,patch

Deno version:
  deno: 1.11.0
  v8: 9.1.269.35
  typescript: 4.3.2

Eggs version:
  0.3.8

Platform:
  x86_64-pc-windows-msvc

2021-06-18T19:06:50.318Z [CRITICAL] An unexpected error occurred: "Unknown option "--bump". Did you mean option "--help"?" 'Error: Unknown option "--bump". Did you mean option "--help"?\n    at Command.parseFlags (https://ibbufvhlsot4bpfiwkap5xu6xxqsxqu6zbmefonuat3gvizgubrq.arweave.net/QENC1OuTp8C8qLKA_t6eveErwp7IWEK5tAT2aqMmoGM/command/command.ts:1124:15)\n    at Command.parse (https://ibbufvhlsot4bpfiwkap5xu6xxqsxqu6zbmefonuat3gvizgubrq.arweave.net/QENC1OuTp8C8qLKA_t6eveErwp7IWEK5tAT2aqMmoGM/command/command.ts:896:58)\n    at Command.parse (https://ibbufvhlsot4bpfiwkap5xu6xxqsxqu6zbmefonuat3gvizgubrq.arweave.net/QENC1OuTp8C8qLKA_t6eveErwp7IWEK5tAT2aqMmoGM/command/command.ts:870:33)\n    at https://7sp22f4di5uth6plorsiiumz67w2wofptwseuinyldrk5jrc5xta.arweave.net/_J-tF4NHaTP563RkhFGZ9-2rOK-dpEohuFjirqYi7eY/eggs.ts:74:34'

It should work fine according to docs.

egg.json `$schema:` url `@` gets escaped in vscode

πŸ› Bug Report

Adding a $schema reference url in your egg.json results in VS Code trying to resolve with the @ symbol url escaped as %40

e.g.

{
  "$schema": "https://x.nest.land/[email protected]/src/schema.json",
  // Unable to load schema from 'https://x.nest.land/eggs%400.3.1/src/schema.json': Request vscode/content failed unexpectedly without providing any details.(768)
  "name": "module-name"
}

To Reproduce

  1. create egg.json
  2. open in VS Code
  3. Add $schema reference listed in docs

Expected behavior

Urls with escaped @ symbols should still resolve

Actual Behavior

Returns error message

Environment

  • Eggs version:
  • Deno version: 1.10.2
  • Operating system and version: WSL2, Ubuntu 20.04

Additional context

NEAT1 support

We're implementing NEAT1, a new approach to API token storage, on the server-side, which will require some changes to eggs too. Here's some information about NEAT1 (first draft): https://github.com/nestdotland/x/blob/5391c04b4e1d28115a22f8f7821083cb2bef7edb/NEAT1-details.txt

In short, Eggs now needs to store both the API key and the username to successfully publish modules. I'm working on a backwards-compatible approach which would allow most users to switch over seamlessly.

Details will be added along the way

Cannot publish on latest deno version

πŸ› Bug Report

To Reproduce

  1. Try to publish an update to your module

Expected behavior

Module gets updated

Actual Behavior

Unexpected error occurs.
image

Environment

  • Eggs version: 0.3.10
  • Deno version:
deno 1.26.0 (release, x86_64-unknown-linux-gnu)
v8 10.7.193.3
typescript 4.8.3
  • Operating system and version: docker container: mcr.microsoft.com/vscode/devcontainers/base:debian-10

Additional context

Apparently the function Deno.setRaw got changed to Deno.stdin.setRaw.
denoland/deno#15797

Add .eggignore file and allow users to chose between the ignore file or the files field in egg.json

Is your feature request related to a problem? If so, please describe.
Right now the nest.land CLI publishes only the files given in the files field, in egg.json. Sometimes people have a lot of files imported from various directories and it's hard to keep track of all of them.

Also if you create a new file it is extra time to add it to the files field.

Describe the solution you'd like
The best solution would be to let the users choose between the files field or a .eggignore file. If the .eggignore file extists, the cli uses it instead of the files field.

Describe alternatives you've considered
An alternative already exists, using *

I will start working on this issue and create a pull request, please comment anything regarding the topic

extend .eggignore with a particular syntax

Is your feature request related to a problem? If so, please describe.
While working on a particular project, I almost published my keyfile to nest.land 😨
I had forgot to setup my .eggignore like my .gitignore

Describe the solution you'd like
A new, easy to implement syntax for .eggignore

extends .gitignore

./other/files/to/ignore

Describe alternatives you've considered
Copy paste my gitignore to eggignore

`eggs publish` hangs in Powershell

πŸ› Bug Report

eggs publish hangs when run in Powershell and keeps displaying the line [INFO] ÔÑΒͺ Checking if the source files are formatted...

To Reproduce

  1. install eggs on windows
  2. go to a module entrypoint like mod.ts
  3. run eggs publish either with arguments or by making an egg.json file first
  4. issue happens

Expected behavior

Successfully performs check if source files are formatted and proceeds with tests and module publish.

Actual Behavior

Keeps displaying [INFO] ÔÑΒͺ Checking if the source files are formatted....

Environment

  • Eggs version: 0.3.8
  • Deno version:
deno 1.11.4 (release, x86_64-pc-windows-msvc)
v8 9.1.269.35
typescript 4.3.2
  • Operating system and version: Windows 10, Version 10.0.19041 Build 19041

Additional context

I run Windows with WSL2 installed, If I publish my module from the Linux system everything works as expected and afterwards I can run eggs publish on Powershell or cmd and it will not hang on the formatting but behave as expected (runs the tests and notices the module version is already is already published)

Use analyzer for extracting local deps.

The current way of extracting dependencies is weird. It just checks for https:// in the file. It would fail in the following scenario:

// it would thing this is a dependency, it's not
await fetch("https://x.nest.land/[email protected]/mod.ts")

deno_swc parses the module into AST and then visits the import declarations. It supports constant dynamic imports as well.

Pseudo code -

import { analyzeDependencies } from "https://x.nest.land/[email protected]/mod.ts"

var deps = analyzeDependencies(`
  import * from "https://x.nest.land/[email protected]/mod.ts";

  import * as smth from "file1.ts"

  await import("file2.ts");

  await import("a"+"b.ts"");
`);
// outputs: [ "file1.ts", "file2.ts", "https://x.nest.land/[email protected]/mod.ts" ]

[BUG] Something broke when publishing...

First of all: Thank You for what you are doing - I think it's amazing.

I wanted to publish a module and got the following eggs-debug.log which I could not interpret by myself to an extent that I could fix the error :)

So perhaps you could automatically add a hint on what went wrong so that the publisher knows how to fix it.

Arguments:
publish

Deno version:
deno: 1.2.0
v8: 8.5.216
typescript: 3.9.2

Eggs version:
0.2.1

Platform:
x86_64-apple-darwin

2020-09-07T12:34:50.913Z [DEBUG] Config: {
name: "log",
description: "Frequently used logger configuration - writing warnings and errors into a file, adding date and time...",
stable: true,
files: [
"logger.ts",
"mod.ts",
"README.md",
"usage-example-sub-module.ts",
"usage-example.ts"
]
}
2020-09-07T12:34:50.916Z [WARNING] Your readme contains old import URLs from your project using deno.land/x/log.
2020-09-07T12:34:50.916Z [WARNING] You can change these to https://x.nest.land/${name}@VERSION
2020-09-07T12:34:51.699Z [WARNING] No version found. Generating a new version now...
2020-09-07T12:34:51.700Z [DEBUG] Module: {
name: "log",
description: "Frequently used logger configuration - writing warnings and errors into a file, adding date and time...",
repository: undefined,
version: "0.0.1",
unlisted: undefined,
upload: true,
latest: true
}
2020-09-07T12:34:52.469Z [CRITICAL] An unexpected error occurred: "Something broke when publishing... " Error: Something broke when publishing...
at Command.publishCommand [as fn] (publish.ts:255:11)
at async Command.execute (command.ts:666:17)
at async Command.parse (command.ts:603:20)
at async Command.parse (command.ts:570:20)
at async mod.ts:47:23

Cannot install eggs due to typescript errors.

πŸ› Bug Report

Cannot install eggs due to typescript errors.

To Reproduce

deno install -Afq --unstable -n eggs https://x.nest.land/[email protected]/eggs.ts

Expected behavior

Installs eggs

Actual Behavior

Dependency error:

error: TS2339 [ERROR]: Property 'operator' does not exist on type 'never'.
    if (high!.operator === comp || high!.operator === ecomp) {
              ~~~~~~~~
    at https://deno.land/x/[email protected]/mod.ts:1744:15

TS2339 [ERROR]: Property 'operator' does not exist on type 'never'.
    if (high!.operator === comp || high!.operator === ecomp) {
                                         ~~~~~~~~
    at https://deno.land/x/[email protected]/mod.ts:1744:42

TS2339 [ERROR]: Property 'operator' does not exist on type 'never'.
      (!low!.operator || low!.operator === comp) &&
             ~~~~~~~~
    at https://deno.land/x/[email protected]/mod.ts:1751:14

TS2339 [ERROR]: Property 'operator' does not exist on type 'never'.
      (!low!.operator || low!.operator === comp) &&
                              ~~~~~~~~
    at https://deno.land/x/[email protected]/mod.ts:1751:31

TS2339 [ERROR]: Property 'semver' does not exist on type 'never'.
      ltefn(version, low!.semver)
                          ~~~~~~
    at https://deno.land/x/[email protected]/mod.ts:1752:27

TS2339 [ERROR]: Property 'operator' does not exist on type 'never'.
    } else if (low!.operator === ecomp && ltfn(version, low!.semver)) {
                    ~~~~~~~~
    at https://deno.land/x/[email protected]/mod.ts:1755:21

TS2339 [ERROR]: Property 'semver' does not exist on type 'never'.
    } else if (low!.operator === ecomp && ltfn(version, low!.semver)) {
                                                             ~~~~~~
    at https://deno.land/x/[email protected]/mod.ts:1755:62

TS2339 [ERROR]: Property 'operator' does not exist on type 'never'.
    if (high!.operator === comp || high!.operator === ecomp) {
              ~~~~~~~~
    at https://deno.land/x/[email protected]/mod.ts:1733:15

TS2339 [ERROR]: Property 'operator' does not exist on type 'never'.
    if (high!.operator === comp || high!.operator === ecomp) {
                                         ~~~~~~~~
    at https://deno.land/x/[email protected]/mod.ts:1733:42

TS2339 [ERROR]: Property 'operator' does not exist on type 'never'.
      (!low!.operator || low!.operator === comp) &&
             ~~~~~~~~
    at https://deno.land/x/[email protected]/mod.ts:1740:14

TS2339 [ERROR]: Property 'operator' does not exist on type 'never'.
      (!low!.operator || low!.operator === comp) &&
                              ~~~~~~~~
    at https://deno.land/x/[email protected]/mod.ts:1740:31

TS2339 [ERROR]: Property 'semver' does not exist on type 'never'.
      ltefn(version, low!.semver)
                          ~~~~~~
    at https://deno.land/x/[email protected]/mod.ts:1741:27

TS2339 [ERROR]: Property 'operator' does not exist on type 'never'.
    } else if (low!.operator === ecomp && ltfn(version, low!.semver)) {
                    ~~~~~~~~
    at https://deno.land/x/[email protected]/mod.ts:1744:21

TS2339 [ERROR]: Property 'semver' does not exist on type 'never'.
    } else if (low!.operator === ecomp && ltfn(version, low!.semver)) {
                                                             ~~~~~~
    at https://deno.land/x/[email protected]/mod.ts:1744:62

Found 14 errors.

Environment

  • Eggs version:
  • Deno version:
  • Operating system and version:

Additional context

Version tags are published as new modules on nest.land

My module's tags are being uploaded to nest.land as entirely new packages for some reason. This is my release pipeline:

name: publish egg

on:
  release:
    types: [published]

jobs:
  publish:
    runs-on: ubuntu-20.04
    steps:
      - uses: actions/checkout@v2
      - uses: denoland/[email protected]
        with:
          deno-version: v1.13.x
      - name: Release
        run: |
          deno install -Af --unstable https://x.nest.land/[email protected]/eggs.ts
          eggs link ${{ secrets.NESTAPIKEY }}
          eggs publish --yes --no-check --version $(git describe --tags $(git rev-list --tags --max-count=1))

egg.json:

{
  "name": "mod",
  "entry": "./mod.ts",
  "description": "Start a new Deno module",
  "unstable": true,
  "version": "v2.2.6",
  "files": [
    "./**/*.ts",
    "./README.md",
    "./LICENSE"
  ],
  "checkFormat": "deno fmt",
  "checkInstallation": true,
  "checkTests": false,
  "check": true,
  "homepage": "https://github.com/GJZwiers/mod",
  "ignore": [],
  "unlisted": false
}

Running tests and formatting for publish command

Both a bug and a feature request.

Is your feature request related to a problem? If so, please describe.

  1. I run eggs publish

  2. Formatting the code takes a long time because it is formatting everything. Problem is i have node_modules and other files that are actually completely unrelated to what i'm publishing (this is problem 1)

  3. When the publish command runs tests, it fails for me. Reason for this is because the command eggs uses to test, isn't what I use - eggs is running tests on files it shouldn't

I'm sure i won't only experience these problems - maybe other modules use cd tests/some/dir && deno test

Describe the solution you'd like
This is to propose a few things:

  1. Only format files specified in the egg.json. I think this makes sense as i assume nest wants the. files formatted so when people check out the module on nest.land, it looks pretty - but they would only be seeing the files specified from egg.json

  2. Allow a user to maybe customise the test command, or maybe a new field/property in egg.json that either specifies the directory or test command to run

  3. Send to stdout before eggs starts formatting, because like i said, it took about a minute or more for me, so i was starting to assume the command was broken (problem 2), for. example, to. test my deno files, i. do cd tests/deno && deno test -A, whereas the publish command does deno test -A --unstable. I also believe. using the --unstable flag should be optional, because that command could break whenever, meaning modules that don't need it cant be published as the cli will error (possible problem 3)

Describe alternatives you've considered
None

Additional context
The repo i want to publish: https://github.com/ebebbington/context-finder

This repo is a project for both Node and Deno, hence the node_modules and other unrelated js code - there's a deno and node variant for everything, which is why it's problematic that the publish command runs deno test and deno fmt at the root directory

[FEATURE] Upload all files if the files field is empty

Is your feature request related to a problem? If so, please describe.
A lot of developers are having problems with the files field. They just want to upload all of their files

Describe the solution you'd like
If the files field is empty or does not exist, upload all files in the folder

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.