deep-foundation / npm-packager

NPM packager package for Deep. It handles installation and publication of deep packages.
https://www.npmjs.com/package/@deep-foundation/npm-packager
The Unlicense
8 stars 1 forks source link

Not human-readable error if package link points to link not contained in a package #66

Open FreePhoenix888 opened 1 year ago

FreePhoenix888 commented 1 year ago

I have Handler link which points to SyncTextFile which is not contained in a package. Here is the error I get:

{
  package: {
    name: '@deep-foundation/object-to-links-async-converter',
    version: '0.0.1-dev.0'
  },
  data: [
    { package: [Object], id: 1 },
    { package: [Object], id: 2 },
    { package: [Object], id: 3 },
    { package: [Object], id: 4 },
    { package: [Object], id: 5 },
    { package: [Object], id: 6 },
    { package: [Object], id: 7 },
    { package: [Object], id: 8 },
    { package: [Object], id: 9 },
    { package: [Object], id: 10 },
    { package: [Object], id: 11 },
    { package: [Object], id: 12 },
    { package: [Object], id: 13 },
    { package: [Object], id: 14 },
    {
      id: 'propertiesTree',
      type: 1,
      from: undefined,
      to: undefined,
      value: undefined
    },
    { id: 'HasResult', type: 2, from: 3, to: 3, value: undefined },
    {
      id: 'treeIncludeDownHasResult',
      type: 4,
      from: 'propertiesTree',
      to: 'HasResult',
      value: undefined
    },
    { id: 'Property', type: 2, from: 3, to: 3, value: undefined },
    {
      id: 'Root',
      type: 2,
      from: undefined,
      to: undefined,
      value: undefined
    },
    { id: 'rootValue', type: 5, from: 'Root', to: 6, value: undefined },
    {
      id: 'dependency@freephoenix888/boolean',
      type: 2,
      from: 7,
      to: 7,
      value: undefined
    },
    { id: 'Boolean', type: 2, from: 3, to: 7, value: undefined },
    { id: 'Object', type: 2, from: 3, to: 3, value: undefined },
    {
      id: 'treeIncludeFromCurrentObject',
      type: 8,
      from: 'propertiesTree',
      to: 'Object',
      value: undefined
    },
    { id: 'Number', type: 2, from: 3, to: 3, value: undefined },
    {
      id: 'treeIncludeFromCurrentNumber',
      type: 8,
      from: 'propertiesTree',
      to: 'Number',
      value: undefined
    },
    { id: 'String', type: 2, from: 3, to: 3, value: undefined },
    {
      id: 'treeIncludeFromCurrentString',
      type: 8,
      from: 'propertiesTree',
      to: 'String',
      value: undefined
    },
    { id: 'ParseIt', type: 2, from: 3, to: 3, value: undefined },
    {
      id: 'treeIncludeFromCurrentBoolean',
      type: 8,
      from: 'propertiesTree',
      to: 7,
      value: undefined
    },
    {
      id: 'clientHandlerCode',
      type: 9,
      from: undefined,
      to: undefined,
      value: [Object]
    },
    {
      id: 'clientHandler',
      type: 10,
      from: 11,
      to: 'clientHandlerCode',
      value: undefined
    },
    {
      id: 'parseItInsertHandler',
      type: 10,
      from: 12,
      to: 13,
      value: undefined
    },
    {
      id: 'handleParseItInsert',
      type: 14,
      from: 'ParseIt',
      to: 'parseItInsertHandler',
      value: undefined
    },
    {
      id: 'parseItInsertHandlerCode',
      type: 9,
      from: undefined,
      to: undefined,
      value: [Object]
    }
  ],
  errors: [ '!dep[3].name', '!item[12].package?.containValue' ],
  dependencies: [
    { name: '@deep-foundation/core', version: '0.0.2' },
    { name: '@deep-foundation/boolean', version: '1.0.0' },
    { name: '@deep-foundation/tsx', version: '0.0.4' },
    { name: undefined, version: undefined }
  ]
}
rejected {
  package: {},
  data: [
    { package: {} }, { package: {} }, { package: {} },
    { package: {} }, { package: {} }, { package: {} },
    { package: {} }, { package: {} }, { package: {} },
    { package: {} }, { package: {} }, { package: {} },
    { package: {} }, { package: {} }, {},
    {},              {},              {},
    {},              {},              {},
    {},              {},              {},
    {},              {},              {},
    {},              {},              {},
    {},              {},              {},
    {},              {}
  ],
  errors: [ '!dep[3].name', '!item[12].package?.containValue' ],
  dependencies: [ {}, {}, {}, {} ]
}

It is not human readable, we should upgrade it