mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-06-14 17:59:59 +00:00
9e13a6ac3e
License-Update:
update c-ares to 1.20.0 [1]
Copyright update [2]
Removed below patches as these are availbe in 20.11.0
0001-build-fix-build-with-Python-3.12.patch [3]
0001-gyp-resolve-python-3.12-issues.patch [4]
Changelog:
https://github.com/nodejs/node/releases/tag/v20.11.0
[1] https://github.com/nodejs/node/commit/b705e19a95b5fc5a2edc9fc11a7649d6eb32d70b
[2] https://github.com/nodejs/node/commit/347e1dd06a5f927d9fd64ce72d776c56d5101910
[3] https://github.com/nodejs/node/commit/0a5e9c12cf961a56bd63005974b953bbc0bc62a7
[4] https://github.com/nodejs/node/commit/68ec1e5eeb4ff984868c625f0ce808210169360d
Signed-off-by: Archana Polampalli <archana.polampalli@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
78 lines
1.7 KiB
JavaScript
Executable File
78 lines
1.7 KiB
JavaScript
Executable File
#!/usr/bin/env node
|
|
|
|
/// Usage: oe-npm-cache <cache-dir> <type> <key> <file-name>
|
|
/// <type> ... meta - metainformation about package
|
|
/// tgz - tarball
|
|
|
|
const process = require("node:process");
|
|
|
|
module.paths.unshift("@@libdir@@/node_modules/npm/node_modules");
|
|
|
|
const cacache = require('cacache')
|
|
const fs = require('fs')
|
|
|
|
// argv[0] is 'node', argv[1] is this script
|
|
const cache_dir = process.argv[2]
|
|
const type = process.argv[3]
|
|
const key = process.argv[4]
|
|
const file = process.argv[5]
|
|
|
|
const data = fs.readFileSync(file)
|
|
|
|
// metadata content is highly nodejs dependent; when cache entries are not
|
|
// found, place debug statements in 'make-fetch-happen/lib/cache/policy.js'
|
|
// (CachePolicy::satisfies())
|
|
const xlate = {
|
|
'meta': {
|
|
'key_prefix': 'make-fetch-happen:request-cache:',
|
|
'metadata': function() {
|
|
return {
|
|
time: Date.now(),
|
|
url: key,
|
|
reqHeaders: {
|
|
'accept': 'application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*',
|
|
},
|
|
resHeaders: {
|
|
"content-type": "application/json",
|
|
"status": 200,
|
|
},
|
|
options: {
|
|
compress: true,
|
|
}
|
|
};
|
|
},
|
|
},
|
|
|
|
'tgz': {
|
|
'key_prefix': 'make-fetch-happen:request-cache:',
|
|
'metadata': function() {
|
|
return {
|
|
time: Date.now(),
|
|
url: key,
|
|
reqHeaders: {
|
|
'accept': '*/*',
|
|
},
|
|
resHeaders: {
|
|
"content-type": "application/octet-stream",
|
|
"status": 200,
|
|
},
|
|
options: {
|
|
compress: true,
|
|
},
|
|
};
|
|
},
|
|
},
|
|
};
|
|
|
|
const info = xlate[type];
|
|
let opts = {}
|
|
|
|
if (info.metadata) {
|
|
opts['metadata'] = info.metadata();
|
|
}
|
|
|
|
cacache.put(cache_dir, info.key_prefix + key, data, opts)
|
|
.then(integrity => {
|
|
console.log(`Saved content of ${key} (${file}).`);
|
|
})
|