Ajout du choix des utilisateurs sur un événement. Ajout de fichiers dans un événement. (dropzone cassée)

This commit is contained in:
2025-05-26 22:10:40 +02:00
parent 82d77e2b8d
commit 49dffff1bf
1100 changed files with 157519 additions and 113 deletions

5
em2rp/node_modules/stream-events/index.d.ts generated vendored Normal file
View File

@ -0,0 +1,5 @@
import { Stream } from "stream";
declare function StreamEvents<StreamType extends Stream>(stream: StreamType)
: StreamType;
declare namespace StreamEvents { }
export = StreamEvents

30
em2rp/node_modules/stream-events/index.js generated vendored Normal file
View File

@ -0,0 +1,30 @@
'use strict';
var stubs = require('stubs')
/*
* StreamEvents can be used 2 ways:
*
* 1:
* function MyStream() {
* require('stream-events').call(this)
* }
*
* 2:
* require('stream-events')(myStream)
*/
function StreamEvents(stream) {
stream = stream || this
var cfg = {
callthrough: true,
calls: 1
}
stubs(stream, '_read', cfg, stream.emit.bind(stream, 'reading'))
stubs(stream, '_write', cfg, stream.emit.bind(stream, 'writing'))
return stream
}
module.exports = StreamEvents

38
em2rp/node_modules/stream-events/package.json generated vendored Normal file
View File

@ -0,0 +1,38 @@
{
"name": "stream-events",
"version": "1.0.5",
"description": "Get an event when you're being sent data or asked for it.",
"main": "index.js",
"types": "index.d.ts",
"files": [
"index.js",
"index.d.ts"
],
"scripts": {
"test": "node ./test"
},
"repository": {
"type": "git",
"url": "https://github.com/stephenplusplus/stream-events"
},
"keywords": [
"stream",
"events",
"read",
"write",
"duplexify",
"lazy-stream"
],
"author": "Stephen Sawchuk",
"license": "MIT",
"bugs": {
"url": "https://github.com/stephenplusplus/stream-events/issues"
},
"homepage": "https://github.com/stephenplusplus/stream-events",
"devDependencies": {
"duplexify": "^3.2.0"
},
"dependencies": {
"stubs": "^3.0.0"
}
}

64
em2rp/node_modules/stream-events/readme.md generated vendored Normal file
View File

@ -0,0 +1,64 @@
# stream-events
> Get an event when you're being sent data or asked for it.
## About
This is just a simple thing that tells you when `_read` and `_write` have been called, saving you the trouble of writing this yourself. You receive two events `reading` and `writing`-- no magic is performed.
This works well with [duplexify](https://github.com/mafintosh/duplexify) or lazy streams, so you can wait until you know you're being used as a stream to do something asynchronous, such as fetching an API token.
## Use
```sh
$ npm install --save stream-events
```
```js
var stream = require('stream')
var streamEvents = require('stream-events')
var util = require('util')
function MyStream() {
stream.Duplex.call(this)
streamEvents.call(this)
}
util.inherits(MyStream, stream.Duplex)
MyStream.prototype._read = function(chunk) {
console.log('_read called as usual')
this.push(new Buffer(chunk))
this.push(null)
}
MyStream.prototype._write = function() {
console.log('_write called as usual')
}
var stream = new MyStream
stream.on('reading', function() {
console.log('stream is being asked for data')
})
stream.on('writing', function() {
console.log('stream is being sent data')
})
stream.pipe(stream)
```
### Using with Duplexify
```js
var duplexify = require('duplexify')
var streamEvents = require('stream-events')
var fs = require('fs')
var dup = streamEvents(duplexify())
dup.on('writing', function() {
// do something async
dup.setWritable(/*writable stream*/)
})
fs.createReadStream('file').pipe(dup)
```