Tag: registry

Bookshelf.jsregistry

我试图使用Bookshelf.js的registry插件,因为我认为我遇到了循环依赖,但我没有得到它。 在我得到这个错误之前,我得到一个错误: [Error: A valid target model must be defined for the category hasMany relation] 我有一个类别和标签模型,但我不断收到错误 [Error: The model Tag could not be resolved from the registry plugin.] 我的类别模型如下所示: var knex = require('knex')(config.knex); var bookshelf = require('bookshelf')(knex); bookshelf.plugin('registry'); var Category = bookshelf.Model.extend({ tableName: 'category', tag: function() { return this.hasMany('Tag', 'category_id'); } }); module.exports = bookshelf.model('Category', […]

如何使用HTTP API从gcr.io Docker Registry列出图像和标签?

我试图从Node.js中的Google Container Registry(gcr.io)中获取可用图像及其标签的列表。 我首先使用google-auto-auth来调用范围为https://www.googleapis.com/auth/devstorage.read_write的令牌,然后将该令牌gcr.io令牌,如下所示: axios.get('https://gcr.io/v2/token?service=gcr.io', { auth: { username: '_token', password: token // token I got from `google-auto-auth` } }) 然后我尝试使用它来调用v2/_catalog端点: axios.get('https://gcr.io/v2/_catalog', { headers: { Authorization: `Bearer ${gcrToken}` } }) 我得到以下错误: { errors: [ { code: 'DENIED', message: 'Failed to retrieve projects.' } ] } 公平的,它必须要求我的项目ID,但我应该在哪里提供它? 只是为了看看我能不能做其他工作,我试过了: axios.get('https://gcr.io/v2/my-project-id/my-image/tags/list', { headers: { Authorization: `Bearer ${gcrToken}` } […]

如何从package.json中的不同registry获得npm依赖关系?

在我的package.json文件中,我声明了一个来自公共注册中心的依赖项,另一个来自私有注册中心(本例中是Artifactory)。 "dependencies": { "vue": "^2.4.4", //public registry "ce-ui": "http://myartifactory.com/artifactory/npm-local/ce-ui/-/ce-ui-0.0.2.tgz" } 我正在寻找方式来使用插入符号或tidle来声明依赖关系 "dependencies": { "vue": "^2.4.4", "ce-ui": "^0.0.2" } 先谢谢你。

私人NPM Sinopiaregistry安装错误

我开始与NPM合作,并且与Sinopia一起求助于 私人npmregistry 。 所以我的第一个命令是: npm install -g sinopia ,我失败了很多错误,所以我请求了这个需求模块 。 所以安装完所有的后,错误的数量在减less,这就是我所得到的: C:\Users\tuto>npm install sinopia npm http GET https://registry.npmjs.org/sinopia npm http 304 https://registry.npmjs.org/sinopia npm http GET https://registry.npmjs.org/fs-ext npm http 304 https://registry.npmjs.org/fs-ext > fs-ext@0.3.2 install C:\Users\tuto\node_modules\sinopia\node_modules \fs-ext > node-gyp configure build C:\Users\tuto\node_modules\sinopia\node_modules\fs-ext>node "C:\Progra m Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bi n\node-gyp.js" configure build gyp http GET http://nodejs.org/dist/v0.10.19/node-v0.10.19.tar.gz gyp http 407 http://nodejs.org/dist/v0.10.19/node-v0.10.19.tar.gz gyp […]