cline 1.0.0-nightly.19 → 1.0.0-nightly.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/cline +0 -0
- package/bin/cline-darwin-amd64 +0 -0
- package/bin/cline-darwin-arm64 +0 -0
- package/bin/cline-host +0 -0
- package/bin/cline-host-darwin-amd64 +0 -0
- package/bin/cline-host-darwin-arm64 +0 -0
- package/bin/cline-host-linux-amd64 +0 -0
- package/bin/cline-host-linux-arm64 +0 -0
- package/bin/cline-linux-amd64 +0 -0
- package/bin/cline-linux-arm64 +0 -0
- package/cline-core.js +24841 -16621
- package/extension/package.json +12 -4
- package/node_modules/b4a/LICENSE +201 -0
- package/node_modules/b4a/README.md +153 -0
- package/node_modules/b4a/browser.js +563 -0
- package/node_modules/b4a/index.js +188 -0
- package/node_modules/b4a/lib/ascii.js +31 -0
- package/node_modules/b4a/lib/base64.js +65 -0
- package/node_modules/b4a/lib/hex.js +51 -0
- package/node_modules/b4a/lib/utf16le.js +40 -0
- package/node_modules/b4a/lib/utf8.js +141 -0
- package/node_modules/b4a/package.json +49 -0
- package/node_modules/b4a/react-native.js +5 -0
- package/node_modules/bare-events/LICENSE +201 -0
- package/node_modules/bare-events/README.md +25 -0
- package/node_modules/bare-events/global.d.ts +15 -0
- package/node_modules/bare-events/global.js +5 -0
- package/node_modules/bare-events/index.d.ts +94 -0
- package/node_modules/bare-events/index.js +355 -0
- package/node_modules/bare-events/lib/errors.js +32 -0
- package/node_modules/bare-events/package.json +61 -0
- package/node_modules/bare-events/web.d.ts +79 -0
- package/node_modules/bare-events/web.js +347 -0
- package/node_modules/bare-fs/CMakeLists.txt +13 -0
- package/node_modules/bare-fs/LICENSE +201 -0
- package/node_modules/bare-fs/README.md +29 -0
- package/node_modules/bare-fs/binding.c +2238 -0
- package/node_modules/bare-fs/binding.js +1 -0
- package/node_modules/bare-fs/index.d.ts +1115 -0
- package/node_modules/bare-fs/index.js +2330 -0
- package/node_modules/bare-fs/lib/constants.d.ts +49 -0
- package/node_modules/bare-fs/lib/constants.js +49 -0
- package/node_modules/bare-fs/lib/errors.d.ts +11 -0
- package/node_modules/bare-fs/lib/errors.js +55 -0
- package/node_modules/bare-fs/package.json +71 -0
- package/node_modules/bare-fs/prebuilds/android-arm/bare-fs.bare +0 -0
- package/node_modules/bare-fs/prebuilds/android-arm64/bare-fs.bare +0 -0
- package/node_modules/bare-fs/prebuilds/android-ia32/bare-fs.bare +0 -0
- package/node_modules/bare-fs/prebuilds/android-x64/bare-fs.bare +0 -0
- package/node_modules/bare-fs/prebuilds/darwin-arm64/bare-fs.bare +0 -0
- package/node_modules/bare-fs/prebuilds/darwin-x64/bare-fs.bare +0 -0
- package/node_modules/bare-fs/prebuilds/ios-arm64/bare-fs.bare +0 -0
- package/node_modules/bare-fs/prebuilds/ios-arm64-simulator/bare-fs.bare +0 -0
- package/node_modules/bare-fs/prebuilds/ios-x64-simulator/bare-fs.bare +0 -0
- package/node_modules/bare-fs/prebuilds/linux-arm64/bare-fs.bare +0 -0
- package/node_modules/bare-fs/prebuilds/linux-x64/bare-fs.bare +0 -0
- package/node_modules/bare-fs/prebuilds/win32-arm64/bare-fs.bare +0 -0
- package/node_modules/bare-fs/prebuilds/win32-x64/bare-fs.bare +0 -0
- package/node_modules/bare-fs/promises.d.ts +282 -0
- package/node_modules/bare-fs/promises.js +90 -0
- package/node_modules/bare-os/CMakeLists.txt +13 -0
- package/node_modules/bare-os/LICENSE +201 -0
- package/node_modules/bare-os/README.md +11 -0
- package/node_modules/bare-os/binding.c +1119 -0
- package/node_modules/bare-os/binding.js +1 -0
- package/node_modules/bare-os/index.d.ts +109 -0
- package/node_modules/bare-os/index.js +99 -0
- package/node_modules/bare-os/lib/constants.js +6 -0
- package/node_modules/bare-os/lib/errors.js +22 -0
- package/node_modules/bare-os/package.json +46 -0
- package/node_modules/bare-os/prebuilds/android-arm/bare-os.bare +0 -0
- package/node_modules/bare-os/prebuilds/android-arm64/bare-os.bare +0 -0
- package/node_modules/bare-os/prebuilds/android-ia32/bare-os.bare +0 -0
- package/node_modules/bare-os/prebuilds/android-x64/bare-os.bare +0 -0
- package/node_modules/bare-os/prebuilds/darwin-arm64/bare-os.bare +0 -0
- package/node_modules/bare-os/prebuilds/darwin-x64/bare-os.bare +0 -0
- package/node_modules/bare-os/prebuilds/ios-arm64/bare-os.bare +0 -0
- package/node_modules/bare-os/prebuilds/ios-arm64-simulator/bare-os.bare +0 -0
- package/node_modules/bare-os/prebuilds/ios-x64-simulator/bare-os.bare +0 -0
- package/node_modules/bare-os/prebuilds/linux-arm64/bare-os.bare +0 -0
- package/node_modules/bare-os/prebuilds/linux-x64/bare-os.bare +0 -0
- package/node_modules/bare-os/prebuilds/win32-arm64/bare-os.bare +0 -0
- package/node_modules/bare-os/prebuilds/win32-x64/bare-os.bare +0 -0
- package/node_modules/bare-path/LICENSE +201 -0
- package/node_modules/bare-path/NOTICE +28 -0
- package/node_modules/bare-path/README.md +19 -0
- package/node_modules/bare-path/index.js +11 -0
- package/node_modules/bare-path/lib/constants.js +11 -0
- package/node_modules/bare-path/lib/posix.js +242 -0
- package/node_modules/bare-path/lib/shared.js +67 -0
- package/node_modules/bare-path/lib/win32.js +513 -0
- package/node_modules/bare-path/package.json +36 -0
- package/node_modules/bare-stream/LICENSE +201 -0
- package/node_modules/bare-stream/README.md +15 -0
- package/node_modules/bare-stream/global.js +8 -0
- package/node_modules/bare-stream/index.d.ts +237 -0
- package/node_modules/bare-stream/index.js +355 -0
- package/node_modules/bare-stream/package.json +61 -0
- package/node_modules/bare-stream/promises.js +3 -0
- package/node_modules/bare-stream/web.d.ts +73 -0
- package/node_modules/bare-stream/web.js +229 -0
- package/node_modules/bare-url/CMakeLists.txt +27 -0
- package/node_modules/bare-url/LICENSE +201 -0
- package/node_modules/bare-url/README.md +19 -0
- package/node_modules/bare-url/binding.c +188 -0
- package/node_modules/bare-url/binding.js +1 -0
- package/node_modules/bare-url/global.d.ts +12 -0
- package/node_modules/bare-url/global.js +2 -0
- package/node_modules/bare-url/index.d.ts +39 -0
- package/node_modules/bare-url/index.js +450 -0
- package/node_modules/bare-url/lib/errors.d.ts +8 -0
- package/node_modules/bare-url/lib/errors.js +38 -0
- package/node_modules/bare-url/lib/url-search-params.d.ts +21 -0
- package/node_modules/bare-url/lib/url-search-params.js +176 -0
- package/node_modules/bare-url/package.json +51 -0
- package/node_modules/bare-url/prebuilds/android-arm/bare-url.bare +0 -0
- package/node_modules/bare-url/prebuilds/android-arm64/bare-url.bare +0 -0
- package/node_modules/bare-url/prebuilds/android-ia32/bare-url.bare +0 -0
- package/node_modules/bare-url/prebuilds/android-x64/bare-url.bare +0 -0
- package/node_modules/bare-url/prebuilds/darwin-arm64/bare-url.bare +0 -0
- package/node_modules/bare-url/prebuilds/darwin-x64/bare-url.bare +0 -0
- package/node_modules/bare-url/prebuilds/ios-arm64/bare-url.bare +0 -0
- package/node_modules/bare-url/prebuilds/ios-arm64-simulator/bare-url.bare +0 -0
- package/node_modules/bare-url/prebuilds/ios-x64-simulator/bare-url.bare +0 -0
- package/node_modules/bare-url/prebuilds/linux-arm64/bare-url.bare +0 -0
- package/node_modules/bare-url/prebuilds/linux-x64/bare-url.bare +0 -0
- package/node_modules/bare-url/prebuilds/win32-arm64/bare-url.bare +0 -0
- package/node_modules/bare-url/prebuilds/win32-x64/bare-url.bare +0 -0
- package/node_modules/better-sqlite3/deps/download.sh +1 -1
- package/node_modules/better-sqlite3/deps/sqlite3/sqlite3.c +122 -81
- package/node_modules/better-sqlite3/deps/sqlite3/sqlite3.h +45 -45
- package/node_modules/better-sqlite3/lib/database.js +1 -1
- package/node_modules/better-sqlite3/package.json +4 -7
- package/node_modules/better-sqlite3/src/addon.cpp +47 -0
- package/node_modules/better-sqlite3/src/better_sqlite3.cpp +44 -2164
- package/node_modules/better-sqlite3/src/objects/backup.cpp +120 -0
- package/node_modules/better-sqlite3/src/objects/backup.hpp +36 -0
- package/node_modules/better-sqlite3/src/objects/database.cpp +417 -0
- package/node_modules/better-sqlite3/src/objects/database.hpp +103 -0
- package/node_modules/better-sqlite3/src/objects/statement-iterator.cpp +113 -0
- package/node_modules/better-sqlite3/src/objects/statement-iterator.hpp +50 -0
- package/node_modules/better-sqlite3/src/objects/statement.cpp +383 -0
- package/node_modules/better-sqlite3/src/objects/statement.hpp +58 -0
- package/node_modules/better-sqlite3/src/util/bind-map.cpp +73 -0
- package/node_modules/better-sqlite3/src/util/binder.cpp +193 -0
- package/node_modules/better-sqlite3/src/util/constants.cpp +172 -0
- package/node_modules/better-sqlite3/src/util/custom-aggregate.cpp +121 -0
- package/node_modules/better-sqlite3/src/util/custom-function.cpp +59 -0
- package/node_modules/better-sqlite3/src/util/custom-table.cpp +409 -0
- package/node_modules/better-sqlite3/src/util/data-converter.cpp +17 -0
- package/node_modules/better-sqlite3/src/util/data.cpp +194 -0
- package/node_modules/better-sqlite3/src/util/helpers.cpp +109 -0
- package/node_modules/better-sqlite3/src/util/macros.cpp +63 -0
- package/node_modules/better-sqlite3/src/util/query-macros.cpp +71 -0
- package/node_modules/better-sqlite3/src/util/row-builder.cpp +49 -0
- package/node_modules/events-universal/LICENSE +201 -0
- package/node_modules/events-universal/README.md +17 -0
- package/node_modules/events-universal/bare.js +1 -0
- package/node_modules/events-universal/default.js +1 -0
- package/node_modules/events-universal/index.js +1 -0
- package/node_modules/events-universal/package.json +39 -0
- package/node_modules/events-universal/react-native.js +1 -0
- package/node_modules/{fs-constants → fast-fifo}/LICENSE +1 -1
- package/node_modules/fast-fifo/README.md +78 -0
- package/node_modules/fast-fifo/fixed-size.js +39 -0
- package/node_modules/fast-fifo/index.js +48 -0
- package/node_modules/fast-fifo/package.json +28 -0
- package/node_modules/{base64-js → streamx}/LICENSE +1 -1
- package/node_modules/streamx/README.md +489 -0
- package/node_modules/streamx/index.js +1184 -0
- package/node_modules/streamx/package.json +34 -0
- package/node_modules/tar-fs/README.md +23 -34
- package/node_modules/tar-fs/index.js +211 -184
- package/node_modules/tar-fs/package.json +27 -7
- package/node_modules/tar-stream/README.md +34 -19
- package/node_modules/tar-stream/constants.js +14 -0
- package/node_modules/tar-stream/extract.js +341 -192
- package/node_modules/tar-stream/headers.js +201 -175
- package/node_modules/tar-stream/pack.js +226 -194
- package/node_modules/tar-stream/package.json +23 -46
- package/node_modules/text-decoder/LICENSE +201 -0
- package/node_modules/text-decoder/README.md +36 -0
- package/node_modules/text-decoder/index.js +64 -0
- package/node_modules/text-decoder/lib/browser-decoder.js +17 -0
- package/node_modules/text-decoder/lib/pass-through-decoder.js +19 -0
- package/node_modules/text-decoder/lib/utf8-decoder.js +104 -0
- package/node_modules/text-decoder/package.json +38 -0
- package/package.json +2 -2
- package/proto/cline/account.proto +10 -8
- package/proto/cline/browser.proto +3 -1
- package/proto/cline/checkpoints.proto +5 -3
- package/proto/cline/commands.proto +4 -2
- package/proto/cline/common.proto +5 -7
- package/proto/cline/dictation.proto +3 -1
- package/proto/cline/file.proto +36 -34
- package/proto/cline/hooks.proto +3 -2
- package/proto/cline/mcp.proto +6 -4
- package/proto/cline/models.proto +189 -19
- package/proto/cline/oca_account.proto +6 -7
- package/proto/cline/slash.proto +3 -1
- package/proto/cline/state.proto +147 -292
- package/proto/cline/task.proto +4 -2
- package/proto/cline/ui.proto +25 -24
- package/proto/cline/web.proto +3 -1
- package/proto/descriptor_set.pb +0 -0
- package/proto/host/diff.proto +5 -4
- package/proto/host/env.proto +8 -7
- package/proto/host/testing.proto +3 -3
- package/proto/host/window.proto +2 -2
- package/proto/host/workspace.proto +24 -11
- package/node_modules/base64-js/README.md +0 -34
- package/node_modules/base64-js/base64js.min.js +0 -1
- package/node_modules/base64-js/index.d.ts +0 -3
- package/node_modules/base64-js/index.js +0 -150
- package/node_modules/base64-js/package.json +0 -47
- package/node_modules/better-sqlite3/src/better_sqlite3.hpp +0 -1036
- package/node_modules/bl/.travis.yml +0 -17
- package/node_modules/bl/BufferList.js +0 -396
- package/node_modules/bl/LICENSE.md +0 -13
- package/node_modules/bl/README.md +0 -247
- package/node_modules/bl/bl.js +0 -84
- package/node_modules/bl/package.json +0 -37
- package/node_modules/bl/test/convert.js +0 -21
- package/node_modules/bl/test/indexOf.js +0 -492
- package/node_modules/bl/test/isBufferList.js +0 -32
- package/node_modules/bl/test/test.js +0 -869
- package/node_modules/buffer/AUTHORS.md +0 -70
- package/node_modules/buffer/LICENSE +0 -21
- package/node_modules/buffer/README.md +0 -410
- package/node_modules/buffer/index.d.ts +0 -186
- package/node_modules/buffer/index.js +0 -1817
- package/node_modules/buffer/package.json +0 -96
- package/node_modules/chownr/LICENSE +0 -15
- package/node_modules/chownr/README.md +0 -3
- package/node_modules/chownr/chownr.js +0 -167
- package/node_modules/chownr/package.json +0 -29
- package/node_modules/fs-constants/README.md +0 -26
- package/node_modules/fs-constants/browser.js +0 -1
- package/node_modules/fs-constants/index.js +0 -1
- package/node_modules/fs-constants/package.json +0 -19
- package/node_modules/ieee754/LICENSE +0 -11
- package/node_modules/ieee754/README.md +0 -51
- package/node_modules/ieee754/index.d.ts +0 -10
- package/node_modules/ieee754/index.js +0 -85
- package/node_modules/ieee754/package.json +0 -52
- package/node_modules/inherits/LICENSE +0 -16
- package/node_modules/inherits/README.md +0 -42
- package/node_modules/inherits/inherits.js +0 -9
- package/node_modules/inherits/inherits_browser.js +0 -27
- package/node_modules/inherits/package.json +0 -29
- package/node_modules/readable-stream/CONTRIBUTING.md +0 -38
- package/node_modules/readable-stream/GOVERNANCE.md +0 -136
- package/node_modules/readable-stream/LICENSE +0 -47
- package/node_modules/readable-stream/README.md +0 -106
- package/node_modules/readable-stream/errors-browser.js +0 -127
- package/node_modules/readable-stream/errors.js +0 -116
- package/node_modules/readable-stream/experimentalWarning.js +0 -17
- package/node_modules/readable-stream/lib/_stream_duplex.js +0 -126
- package/node_modules/readable-stream/lib/_stream_passthrough.js +0 -37
- package/node_modules/readable-stream/lib/_stream_readable.js +0 -1027
- package/node_modules/readable-stream/lib/_stream_transform.js +0 -190
- package/node_modules/readable-stream/lib/_stream_writable.js +0 -641
- package/node_modules/readable-stream/lib/internal/streams/async_iterator.js +0 -180
- package/node_modules/readable-stream/lib/internal/streams/buffer_list.js +0 -183
- package/node_modules/readable-stream/lib/internal/streams/destroy.js +0 -96
- package/node_modules/readable-stream/lib/internal/streams/end-of-stream.js +0 -86
- package/node_modules/readable-stream/lib/internal/streams/from-browser.js +0 -3
- package/node_modules/readable-stream/lib/internal/streams/from.js +0 -52
- package/node_modules/readable-stream/lib/internal/streams/pipeline.js +0 -86
- package/node_modules/readable-stream/lib/internal/streams/state.js +0 -22
- package/node_modules/readable-stream/lib/internal/streams/stream-browser.js +0 -1
- package/node_modules/readable-stream/lib/internal/streams/stream.js +0 -1
- package/node_modules/readable-stream/package.json +0 -68
- package/node_modules/readable-stream/readable-browser.js +0 -9
- package/node_modules/readable-stream/readable.js +0 -16
- package/node_modules/string_decoder/LICENSE +0 -48
- package/node_modules/string_decoder/README.md +0 -47
- package/node_modules/string_decoder/lib/string_decoder.js +0 -296
- package/node_modules/string_decoder/package.json +0 -34
- package/node_modules/tar-fs/.travis.yml +0 -6
- package/node_modules/tar-fs/test/fixtures/a/hello.txt +0 -1
- package/node_modules/tar-fs/test/fixtures/b/a/test.txt +0 -1
- package/node_modules/tar-fs/test/fixtures/d/file1 +0 -0
- package/node_modules/tar-fs/test/fixtures/d/file2 +0 -0
- package/node_modules/tar-fs/test/fixtures/d/sub-dir/file5 +0 -0
- package/node_modules/tar-fs/test/fixtures/d/sub-files/file3 +0 -0
- package/node_modules/tar-fs/test/fixtures/d/sub-files/file4 +0 -0
- package/node_modules/tar-fs/test/fixtures/e/directory/.ignore +0 -0
- package/node_modules/tar-fs/test/fixtures/e/file +0 -0
- package/node_modules/tar-fs/test/fixtures/invalid.tar +0 -0
- package/node_modules/tar-fs/test/index.js +0 -346
- package/node_modules/tar-stream/sandbox.js +0 -11
- package/node_modules/util-deprecate/History.md +0 -16
- package/node_modules/util-deprecate/LICENSE +0 -24
- package/node_modules/util-deprecate/README.md +0 -53
- package/node_modules/util-deprecate/browser.js +0 -67
- package/node_modules/util-deprecate/node.js +0 -6
- package/node_modules/util-deprecate/package.json +0 -27
- package/test-startup.sh +0 -14
|
@@ -1,346 +0,0 @@
|
|
|
1
|
-
var test = require('tape')
|
|
2
|
-
var rimraf = require('rimraf')
|
|
3
|
-
var tar = require('../index')
|
|
4
|
-
var tarStream = require('tar-stream')
|
|
5
|
-
var path = require('path')
|
|
6
|
-
var fs = require('fs')
|
|
7
|
-
var os = require('os')
|
|
8
|
-
|
|
9
|
-
var win32 = os.platform() === 'win32'
|
|
10
|
-
|
|
11
|
-
var mtime = function (st) {
|
|
12
|
-
return Math.floor(st.mtime.getTime() / 1000)
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
test('copy a -> copy/a', function (t) {
|
|
16
|
-
t.plan(5)
|
|
17
|
-
|
|
18
|
-
var a = path.join(__dirname, 'fixtures', 'a')
|
|
19
|
-
var b = path.join(__dirname, 'fixtures', 'copy', 'a')
|
|
20
|
-
|
|
21
|
-
rimraf.sync(b)
|
|
22
|
-
tar.pack(a)
|
|
23
|
-
.pipe(tar.extract(b))
|
|
24
|
-
.on('finish', function () {
|
|
25
|
-
var files = fs.readdirSync(b)
|
|
26
|
-
t.same(files.length, 1)
|
|
27
|
-
t.same(files[0], 'hello.txt')
|
|
28
|
-
var fileB = path.join(b, files[0])
|
|
29
|
-
var fileA = path.join(a, files[0])
|
|
30
|
-
t.same(fs.readFileSync(fileB, 'utf-8'), fs.readFileSync(fileA, 'utf-8'))
|
|
31
|
-
t.same(fs.statSync(fileB).mode, fs.statSync(fileA).mode)
|
|
32
|
-
t.same(mtime(fs.statSync(fileB)), mtime(fs.statSync(fileA)))
|
|
33
|
-
})
|
|
34
|
-
})
|
|
35
|
-
|
|
36
|
-
test('copy b -> copy/b', function (t) {
|
|
37
|
-
t.plan(8)
|
|
38
|
-
|
|
39
|
-
var a = path.join(__dirname, 'fixtures', 'b')
|
|
40
|
-
var b = path.join(__dirname, 'fixtures', 'copy', 'b')
|
|
41
|
-
|
|
42
|
-
rimraf.sync(b)
|
|
43
|
-
tar.pack(a)
|
|
44
|
-
.pipe(tar.extract(b))
|
|
45
|
-
.on('finish', function () {
|
|
46
|
-
var files = fs.readdirSync(b)
|
|
47
|
-
t.same(files.length, 1)
|
|
48
|
-
t.same(files[0], 'a')
|
|
49
|
-
var dirB = path.join(b, files[0])
|
|
50
|
-
var dirA = path.join(a, files[0])
|
|
51
|
-
t.same(fs.statSync(dirB).mode, fs.statSync(dirA).mode)
|
|
52
|
-
t.same(mtime(fs.statSync(dirB)), mtime(fs.statSync(dirA)))
|
|
53
|
-
t.ok(fs.statSync(dirB).isDirectory())
|
|
54
|
-
var fileB = path.join(dirB, 'test.txt')
|
|
55
|
-
var fileA = path.join(dirA, 'test.txt')
|
|
56
|
-
t.same(fs.readFileSync(fileB, 'utf-8'), fs.readFileSync(fileA, 'utf-8'))
|
|
57
|
-
t.same(fs.statSync(fileB).mode, fs.statSync(fileA).mode)
|
|
58
|
-
t.same(mtime(fs.statSync(fileB)), mtime(fs.statSync(fileA)))
|
|
59
|
-
})
|
|
60
|
-
})
|
|
61
|
-
|
|
62
|
-
test('symlink', function (t) {
|
|
63
|
-
if (win32) { // no symlink support on win32 currently. TODO: test if this can be enabled somehow
|
|
64
|
-
t.plan(1)
|
|
65
|
-
t.ok(true)
|
|
66
|
-
return
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
t.plan(5)
|
|
70
|
-
|
|
71
|
-
var a = path.join(__dirname, 'fixtures', 'c')
|
|
72
|
-
|
|
73
|
-
rimraf.sync(path.join(a, 'link'))
|
|
74
|
-
fs.symlinkSync('.gitignore', path.join(a, 'link'))
|
|
75
|
-
|
|
76
|
-
var b = path.join(__dirname, 'fixtures', 'copy', 'c')
|
|
77
|
-
|
|
78
|
-
rimraf.sync(b)
|
|
79
|
-
tar.pack(a)
|
|
80
|
-
.pipe(tar.extract(b))
|
|
81
|
-
.on('finish', function () {
|
|
82
|
-
var files = fs.readdirSync(b).sort()
|
|
83
|
-
t.same(files.length, 2)
|
|
84
|
-
t.same(files[0], '.gitignore')
|
|
85
|
-
t.same(files[1], 'link')
|
|
86
|
-
|
|
87
|
-
var linkA = path.join(a, 'link')
|
|
88
|
-
var linkB = path.join(b, 'link')
|
|
89
|
-
|
|
90
|
-
t.same(mtime(fs.lstatSync(linkB)), mtime(fs.lstatSync(linkA)))
|
|
91
|
-
t.same(fs.readlinkSync(linkB), fs.readlinkSync(linkA))
|
|
92
|
-
})
|
|
93
|
-
})
|
|
94
|
-
|
|
95
|
-
test('follow symlinks', function (t) {
|
|
96
|
-
if (win32) { // no symlink support on win32 currently. TODO: test if this can be enabled somehow
|
|
97
|
-
t.plan(1)
|
|
98
|
-
t.ok(true)
|
|
99
|
-
return
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
t.plan(5)
|
|
103
|
-
|
|
104
|
-
var a = path.join(__dirname, 'fixtures', 'c')
|
|
105
|
-
|
|
106
|
-
rimraf.sync(path.join(a, 'link'))
|
|
107
|
-
fs.symlinkSync('.gitignore', path.join(a, 'link'))
|
|
108
|
-
|
|
109
|
-
var b = path.join(__dirname, 'fixtures', 'copy', 'c-dereference')
|
|
110
|
-
|
|
111
|
-
rimraf.sync(b)
|
|
112
|
-
tar.pack(a, { dereference: true })
|
|
113
|
-
.pipe(tar.extract(b))
|
|
114
|
-
.on('finish', function () {
|
|
115
|
-
var files = fs.readdirSync(b).sort()
|
|
116
|
-
t.same(files.length, 2)
|
|
117
|
-
t.same(files[0], '.gitignore')
|
|
118
|
-
t.same(files[1], 'link')
|
|
119
|
-
|
|
120
|
-
var file1 = path.join(b, '.gitignore')
|
|
121
|
-
var file2 = path.join(b, 'link')
|
|
122
|
-
|
|
123
|
-
t.same(mtime(fs.lstatSync(file1)), mtime(fs.lstatSync(file2)))
|
|
124
|
-
t.same(fs.readFileSync(file1), fs.readFileSync(file2))
|
|
125
|
-
})
|
|
126
|
-
})
|
|
127
|
-
|
|
128
|
-
test('strip', function (t) {
|
|
129
|
-
t.plan(2)
|
|
130
|
-
|
|
131
|
-
var a = path.join(__dirname, 'fixtures', 'b')
|
|
132
|
-
var b = path.join(__dirname, 'fixtures', 'copy', 'b-strip')
|
|
133
|
-
|
|
134
|
-
rimraf.sync(b)
|
|
135
|
-
|
|
136
|
-
tar.pack(a)
|
|
137
|
-
.pipe(tar.extract(b, { strip: 1 }))
|
|
138
|
-
.on('finish', function () {
|
|
139
|
-
var files = fs.readdirSync(b).sort()
|
|
140
|
-
t.same(files.length, 1)
|
|
141
|
-
t.same(files[0], 'test.txt')
|
|
142
|
-
})
|
|
143
|
-
})
|
|
144
|
-
|
|
145
|
-
test('strip + map', function (t) {
|
|
146
|
-
t.plan(2)
|
|
147
|
-
|
|
148
|
-
var a = path.join(__dirname, 'fixtures', 'b')
|
|
149
|
-
var b = path.join(__dirname, 'fixtures', 'copy', 'b-strip')
|
|
150
|
-
|
|
151
|
-
rimraf.sync(b)
|
|
152
|
-
|
|
153
|
-
var uppercase = function (header) {
|
|
154
|
-
header.name = header.name.toUpperCase()
|
|
155
|
-
return header
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
tar.pack(a)
|
|
159
|
-
.pipe(tar.extract(b, { strip: 1, map: uppercase }))
|
|
160
|
-
.on('finish', function () {
|
|
161
|
-
var files = fs.readdirSync(b).sort()
|
|
162
|
-
t.same(files.length, 1)
|
|
163
|
-
t.same(files[0], 'TEST.TXT')
|
|
164
|
-
})
|
|
165
|
-
})
|
|
166
|
-
|
|
167
|
-
test('map + dir + permissions', function (t) {
|
|
168
|
-
t.plan(win32 ? 1 : 2) // skip chmod test, it's not working like unix
|
|
169
|
-
|
|
170
|
-
var a = path.join(__dirname, 'fixtures', 'b')
|
|
171
|
-
var b = path.join(__dirname, 'fixtures', 'copy', 'a-perms')
|
|
172
|
-
|
|
173
|
-
rimraf.sync(b)
|
|
174
|
-
|
|
175
|
-
var aWithMode = function (header) {
|
|
176
|
-
if (header.name === 'a') {
|
|
177
|
-
header.mode = parseInt(700, 8)
|
|
178
|
-
}
|
|
179
|
-
return header
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
tar.pack(a)
|
|
183
|
-
.pipe(tar.extract(b, { map: aWithMode }))
|
|
184
|
-
.on('finish', function () {
|
|
185
|
-
var files = fs.readdirSync(b).sort()
|
|
186
|
-
var stat = fs.statSync(path.join(b, 'a'))
|
|
187
|
-
t.same(files.length, 1)
|
|
188
|
-
if (!win32) {
|
|
189
|
-
t.same(stat.mode & parseInt(777, 8), parseInt(700, 8))
|
|
190
|
-
}
|
|
191
|
-
})
|
|
192
|
-
})
|
|
193
|
-
|
|
194
|
-
test('specific entries', function (t) {
|
|
195
|
-
t.plan(6)
|
|
196
|
-
|
|
197
|
-
var a = path.join(__dirname, 'fixtures', 'd')
|
|
198
|
-
var b = path.join(__dirname, 'fixtures', 'copy', 'd-entries')
|
|
199
|
-
|
|
200
|
-
var entries = ['file1', 'sub-files/file3', 'sub-dir']
|
|
201
|
-
|
|
202
|
-
rimraf.sync(b)
|
|
203
|
-
tar.pack(a, { entries: entries })
|
|
204
|
-
.pipe(tar.extract(b))
|
|
205
|
-
.on('finish', function () {
|
|
206
|
-
var files = fs.readdirSync(b)
|
|
207
|
-
t.same(files.length, 3)
|
|
208
|
-
t.notSame(files.indexOf('file1'), -1)
|
|
209
|
-
t.notSame(files.indexOf('sub-files'), -1)
|
|
210
|
-
t.notSame(files.indexOf('sub-dir'), -1)
|
|
211
|
-
var subFiles = fs.readdirSync(path.join(b, 'sub-files'))
|
|
212
|
-
t.same(subFiles, ['file3'])
|
|
213
|
-
var subDir = fs.readdirSync(path.join(b, 'sub-dir'))
|
|
214
|
-
t.same(subDir, ['file5'])
|
|
215
|
-
})
|
|
216
|
-
})
|
|
217
|
-
|
|
218
|
-
test('check type while mapping header on packing', function (t) {
|
|
219
|
-
t.plan(3)
|
|
220
|
-
|
|
221
|
-
var e = path.join(__dirname, 'fixtures', 'e')
|
|
222
|
-
|
|
223
|
-
var checkHeaderType = function (header) {
|
|
224
|
-
if (header.name.indexOf('.') === -1) t.same(header.type, header.name)
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
tar.pack(e, { map: checkHeaderType })
|
|
228
|
-
})
|
|
229
|
-
|
|
230
|
-
test('finish callbacks', function (t) {
|
|
231
|
-
t.plan(3)
|
|
232
|
-
|
|
233
|
-
var a = path.join(__dirname, 'fixtures', 'a')
|
|
234
|
-
var b = path.join(__dirname, 'fixtures', 'copy', 'a')
|
|
235
|
-
|
|
236
|
-
rimraf.sync(b)
|
|
237
|
-
|
|
238
|
-
var packEntries = 0
|
|
239
|
-
var extractEntries = 0
|
|
240
|
-
|
|
241
|
-
var countPackEntry = function (header) { packEntries++ }
|
|
242
|
-
var countExtractEntry = function (header) { extractEntries++ }
|
|
243
|
-
|
|
244
|
-
var pack
|
|
245
|
-
var onPackFinish = function (passedPack) {
|
|
246
|
-
t.equal(packEntries, 2, 'All entries have been packed') // 2 entries - the file and base directory
|
|
247
|
-
t.equal(passedPack, pack, 'The finish hook passes the pack')
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
var onExtractFinish = function () { t.equal(extractEntries, 2) }
|
|
251
|
-
|
|
252
|
-
pack = tar.pack(a, { map: countPackEntry, finish: onPackFinish })
|
|
253
|
-
|
|
254
|
-
pack.pipe(tar.extract(b, { map: countExtractEntry, finish: onExtractFinish }))
|
|
255
|
-
.on('finish', function () {
|
|
256
|
-
t.end()
|
|
257
|
-
})
|
|
258
|
-
})
|
|
259
|
-
|
|
260
|
-
test('not finalizing the pack', function (t) {
|
|
261
|
-
t.plan(2)
|
|
262
|
-
|
|
263
|
-
var a = path.join(__dirname, 'fixtures', 'a')
|
|
264
|
-
var b = path.join(__dirname, 'fixtures', 'b')
|
|
265
|
-
|
|
266
|
-
var out = path.join(__dirname, 'fixtures', 'copy', 'merged-packs')
|
|
267
|
-
|
|
268
|
-
rimraf.sync(out)
|
|
269
|
-
|
|
270
|
-
var prefixer = function (prefix) {
|
|
271
|
-
return function (header) {
|
|
272
|
-
header.name = path.join(prefix, header.name)
|
|
273
|
-
return header
|
|
274
|
-
}
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
tar.pack(a, {
|
|
278
|
-
map: prefixer('a-files'),
|
|
279
|
-
finalize: false,
|
|
280
|
-
finish: packB
|
|
281
|
-
})
|
|
282
|
-
|
|
283
|
-
function packB (pack) {
|
|
284
|
-
tar.pack(b, { pack: pack, map: prefixer('b-files') })
|
|
285
|
-
.pipe(tar.extract(out))
|
|
286
|
-
.on('finish', assertResults)
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
function assertResults () {
|
|
290
|
-
var containers = fs.readdirSync(out)
|
|
291
|
-
t.deepEqual(containers, ['a-files', 'b-files'])
|
|
292
|
-
var aFiles = fs.readdirSync(path.join(out, 'a-files'))
|
|
293
|
-
t.deepEqual(aFiles, ['hello.txt'])
|
|
294
|
-
}
|
|
295
|
-
})
|
|
296
|
-
|
|
297
|
-
test('do not extract invalid tar', function (t) {
|
|
298
|
-
var a = path.join(__dirname, 'fixtures', 'invalid.tar')
|
|
299
|
-
|
|
300
|
-
var out = path.join(__dirname, 'fixtures', 'invalid')
|
|
301
|
-
|
|
302
|
-
rimraf.sync(out)
|
|
303
|
-
|
|
304
|
-
fs.createReadStream(a)
|
|
305
|
-
.pipe(tar.extract(out))
|
|
306
|
-
.on('error', function (err) {
|
|
307
|
-
t.ok(/is not a valid symlink/i.test(err.message))
|
|
308
|
-
fs.stat(path.join(out, '../bar'), function (err) {
|
|
309
|
-
t.ok(err)
|
|
310
|
-
t.end()
|
|
311
|
-
})
|
|
312
|
-
})
|
|
313
|
-
})
|
|
314
|
-
|
|
315
|
-
test('no abs hardlink targets', function (t) {
|
|
316
|
-
var out = path.join(__dirname, 'fixtures', 'invalid')
|
|
317
|
-
var outside = path.join(__dirname, 'fixtures', 'outside')
|
|
318
|
-
|
|
319
|
-
rimraf.sync(out)
|
|
320
|
-
|
|
321
|
-
var s = tarStream.pack()
|
|
322
|
-
|
|
323
|
-
fs.writeFileSync(outside, 'something')
|
|
324
|
-
|
|
325
|
-
s.entry({
|
|
326
|
-
type: 'link',
|
|
327
|
-
name: 'link',
|
|
328
|
-
linkname: outside
|
|
329
|
-
})
|
|
330
|
-
|
|
331
|
-
s.entry({
|
|
332
|
-
name: 'link'
|
|
333
|
-
}, 'overwrite')
|
|
334
|
-
|
|
335
|
-
s.finalize()
|
|
336
|
-
|
|
337
|
-
s.pipe(tar.extract(out))
|
|
338
|
-
.on('error', function (err) {
|
|
339
|
-
t.ok(err, 'had error')
|
|
340
|
-
fs.readFile(outside, 'utf-8', function (err, str) {
|
|
341
|
-
t.error(err, 'no error')
|
|
342
|
-
t.same(str, 'something')
|
|
343
|
-
t.end()
|
|
344
|
-
})
|
|
345
|
-
})
|
|
346
|
-
})
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
const tar = require('tar-stream')
|
|
2
|
-
const fs = require('fs')
|
|
3
|
-
const path = require('path')
|
|
4
|
-
const pipeline = require('pump') // eequire('stream').pipeline
|
|
5
|
-
|
|
6
|
-
fs.createReadStream('test.tar')
|
|
7
|
-
.pipe(tar.extract())
|
|
8
|
-
.on('entry', function (header, stream, done) {
|
|
9
|
-
console.log(header.name)
|
|
10
|
-
pipeline(stream, fs.createWriteStream(path.join('/tmp', header.name)), done)
|
|
11
|
-
})
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
1.0.2 / 2015-10-07
|
|
3
|
-
==================
|
|
4
|
-
|
|
5
|
-
* use try/catch when checking `localStorage` (#3, @kumavis)
|
|
6
|
-
|
|
7
|
-
1.0.1 / 2014-11-25
|
|
8
|
-
==================
|
|
9
|
-
|
|
10
|
-
* browser: use `console.warn()` for deprecation calls
|
|
11
|
-
* browser: more jsdocs
|
|
12
|
-
|
|
13
|
-
1.0.0 / 2014-04-30
|
|
14
|
-
==================
|
|
15
|
-
|
|
16
|
-
* initial commit
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
(The MIT License)
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2014 Nathan Rajlich <nathan@tootallnate.net>
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person
|
|
6
|
-
obtaining a copy of this software and associated documentation
|
|
7
|
-
files (the "Software"), to deal in the Software without
|
|
8
|
-
restriction, including without limitation the rights to use,
|
|
9
|
-
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
-
copies of the Software, and to permit persons to whom the
|
|
11
|
-
Software is furnished to do so, subject to the following
|
|
12
|
-
conditions:
|
|
13
|
-
|
|
14
|
-
The above copyright notice and this permission notice shall be
|
|
15
|
-
included in all copies or substantial portions of the Software.
|
|
16
|
-
|
|
17
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
18
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
|
19
|
-
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
20
|
-
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
|
21
|
-
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
22
|
-
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
23
|
-
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
24
|
-
OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
util-deprecate
|
|
2
|
-
==============
|
|
3
|
-
### The Node.js `util.deprecate()` function with browser support
|
|
4
|
-
|
|
5
|
-
In Node.js, this module simply re-exports the `util.deprecate()` function.
|
|
6
|
-
|
|
7
|
-
In the web browser (i.e. via browserify), a browser-specific implementation
|
|
8
|
-
of the `util.deprecate()` function is used.
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
## API
|
|
12
|
-
|
|
13
|
-
A `deprecate()` function is the only thing exposed by this module.
|
|
14
|
-
|
|
15
|
-
``` javascript
|
|
16
|
-
// setup:
|
|
17
|
-
exports.foo = deprecate(foo, 'foo() is deprecated, use bar() instead');
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
// users see:
|
|
21
|
-
foo();
|
|
22
|
-
// foo() is deprecated, use bar() instead
|
|
23
|
-
foo();
|
|
24
|
-
foo();
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
## License
|
|
29
|
-
|
|
30
|
-
(The MIT License)
|
|
31
|
-
|
|
32
|
-
Copyright (c) 2014 Nathan Rajlich <nathan@tootallnate.net>
|
|
33
|
-
|
|
34
|
-
Permission is hereby granted, free of charge, to any person
|
|
35
|
-
obtaining a copy of this software and associated documentation
|
|
36
|
-
files (the "Software"), to deal in the Software without
|
|
37
|
-
restriction, including without limitation the rights to use,
|
|
38
|
-
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
39
|
-
copies of the Software, and to permit persons to whom the
|
|
40
|
-
Software is furnished to do so, subject to the following
|
|
41
|
-
conditions:
|
|
42
|
-
|
|
43
|
-
The above copyright notice and this permission notice shall be
|
|
44
|
-
included in all copies or substantial portions of the Software.
|
|
45
|
-
|
|
46
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
47
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
|
48
|
-
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
49
|
-
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
|
50
|
-
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
51
|
-
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
52
|
-
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
53
|
-
OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* Module exports.
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
module.exports = deprecate;
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Mark that a method should not be used.
|
|
10
|
-
* Returns a modified function which warns once by default.
|
|
11
|
-
*
|
|
12
|
-
* If `localStorage.noDeprecation = true` is set, then it is a no-op.
|
|
13
|
-
*
|
|
14
|
-
* If `localStorage.throwDeprecation = true` is set, then deprecated functions
|
|
15
|
-
* will throw an Error when invoked.
|
|
16
|
-
*
|
|
17
|
-
* If `localStorage.traceDeprecation = true` is set, then deprecated functions
|
|
18
|
-
* will invoke `console.trace()` instead of `console.error()`.
|
|
19
|
-
*
|
|
20
|
-
* @param {Function} fn - the function to deprecate
|
|
21
|
-
* @param {String} msg - the string to print to the console when `fn` is invoked
|
|
22
|
-
* @returns {Function} a new "deprecated" version of `fn`
|
|
23
|
-
* @api public
|
|
24
|
-
*/
|
|
25
|
-
|
|
26
|
-
function deprecate (fn, msg) {
|
|
27
|
-
if (config('noDeprecation')) {
|
|
28
|
-
return fn;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
var warned = false;
|
|
32
|
-
function deprecated() {
|
|
33
|
-
if (!warned) {
|
|
34
|
-
if (config('throwDeprecation')) {
|
|
35
|
-
throw new Error(msg);
|
|
36
|
-
} else if (config('traceDeprecation')) {
|
|
37
|
-
console.trace(msg);
|
|
38
|
-
} else {
|
|
39
|
-
console.warn(msg);
|
|
40
|
-
}
|
|
41
|
-
warned = true;
|
|
42
|
-
}
|
|
43
|
-
return fn.apply(this, arguments);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
return deprecated;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* Checks `localStorage` for boolean values for the given `name`.
|
|
51
|
-
*
|
|
52
|
-
* @param {String} name
|
|
53
|
-
* @returns {Boolean}
|
|
54
|
-
* @api private
|
|
55
|
-
*/
|
|
56
|
-
|
|
57
|
-
function config (name) {
|
|
58
|
-
// accessing global.localStorage can trigger a DOMException in sandboxed iframes
|
|
59
|
-
try {
|
|
60
|
-
if (!global.localStorage) return false;
|
|
61
|
-
} catch (_) {
|
|
62
|
-
return false;
|
|
63
|
-
}
|
|
64
|
-
var val = global.localStorage[name];
|
|
65
|
-
if (null == val) return false;
|
|
66
|
-
return String(val).toLowerCase() === 'true';
|
|
67
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "util-deprecate",
|
|
3
|
-
"version": "1.0.2",
|
|
4
|
-
"description": "The Node.js `util.deprecate()` function with browser support",
|
|
5
|
-
"main": "node.js",
|
|
6
|
-
"browser": "browser.js",
|
|
7
|
-
"scripts": {
|
|
8
|
-
"test": "echo \"Error: no test specified\" && exit 1"
|
|
9
|
-
},
|
|
10
|
-
"repository": {
|
|
11
|
-
"type": "git",
|
|
12
|
-
"url": "git://github.com/TooTallNate/util-deprecate.git"
|
|
13
|
-
},
|
|
14
|
-
"keywords": [
|
|
15
|
-
"util",
|
|
16
|
-
"deprecate",
|
|
17
|
-
"browserify",
|
|
18
|
-
"browser",
|
|
19
|
-
"node"
|
|
20
|
-
],
|
|
21
|
-
"author": "Nathan Rajlich <nathan@tootallnate.net> (http://n8.io/)",
|
|
22
|
-
"license": "MIT",
|
|
23
|
-
"bugs": {
|
|
24
|
-
"url": "https://github.com/TooTallNate/util-deprecate/issues"
|
|
25
|
-
},
|
|
26
|
-
"homepage": "https://github.com/TooTallNate/util-deprecate"
|
|
27
|
-
}
|
package/test-startup.sh
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
# Test script to check if cline-core starts without errors
|
|
3
|
-
|
|
4
|
-
echo "Testing cline-core startup..."
|
|
5
|
-
node cline-core.js &
|
|
6
|
-
PID=$!
|
|
7
|
-
|
|
8
|
-
# Wait for 3 seconds
|
|
9
|
-
sleep 3
|
|
10
|
-
|
|
11
|
-
# Kill the process
|
|
12
|
-
kill $PID 2>/dev/null
|
|
13
|
-
|
|
14
|
-
echo "Test complete"
|